Skip to content

Commit

Permalink
Try to fix Windows using gcc instead of g++ to link the package.
Browse files Browse the repository at this point in the history
  • Loading branch information
reedacartwright committed Mar 20, 2023
1 parent 46ddb4b commit f39bcc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ build_dir=src/leveldb-mcpe/build
"-DCMAKE_AR=${AR}" \
"-DCMAKE_RANLIB=${RANLIB}" \
-DCMAKE_BUILD_TYPE=Release \
-DLEVELDB_BUILD_TESTS:BOOL=OFF \
-DBUILD_SHARED_LIBS:bool=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS:BOOL=OFF \
-DLEVELDB_BUILD_TESTS:BOOL=OFF \
-Wno-dev
)

Expand Down
3 changes: 2 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

PKG_CFLAGS = $(C_VISIBILITY)
PKG_CXXFLAGS = $(CXX_VISIBILITY)
PKG_CPPFLAGS = -pthread -I./leveldb-mcpe/include -I./leveldb-mcpe/build/include
Expand All @@ -11,7 +12,7 @@ $(shell mkdir -p leveldb-mcpe/build)

leveldb-mcpe/build/libleveldb.a: leveldb-mcpe/Makefile.mingw leveldb-mcpe/build/include/port/port_config.h
$(MAKE) --directory=leveldb-mcpe/build -f ../Makefile.mingw \
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) $(CXXPICFLAGS)" \
AR="$(AR)" RANLIB="$(RANLIB)"

leveldb-mcpe/build/include/port/port_config.h: leveldb-mcpe/port_config.h.mingw
Expand Down
3 changes: 3 additions & 0 deletions src/dummy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* This file is a dummy to signal to R that we need to link using a C++
* compiler.
*/

0 comments on commit f39bcc9

Please sign in to comment.