Skip to content
Snippets Groups Projects

Use -fPIC when compiling the dynamic library

Merged tusooa requested to merge tusooa/fpic into servant
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -50,7 +50,7 @@ $(SHARED_LIB_PREFIX).$(VERSION): $(STATIC_LIB)
cd objects && \
$(AR) x ../$(STATIC_LIB) && \
cd .. && \
$(CXX) objects/*.o -shared -Wl,-soname=$(SHARED_LIB_NAME) -o $(SHARED_LIB_PREFIX).$(VERSION)
$(CXX) objects/*.o -shared -fPIC -Wl,-soname=$(SHARED_LIB_NAME) -o $(SHARED_LIB_PREFIX).$(VERSION)
TEST_CXXFLAGS = -Wall -g -pthread -std=c++17 -lgtest_main \
-lgtest -lolm -lboost_json -lpthread -I $(CXXBRIDGE_DIR) \
Loading