diff --git a/build.sh b/build.sh index 73087e0..e314056 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ CXX_WITH_FLAGS="$CXX $CXXFLAGS" echo "Building libs..." mkdir -pv bin/lib for lib in $(find ./src/lib -name "*.cpp"); do - COMPILE_COMMAND="$CXX_WITH_FLAGS -shared -o $(sed -e 's/^.\/src/.\/bin/;s/cpp$/so/' <<< $lib) $lib" + COMPILE_COMMAND="$CXX_WITH_FLAGS -fPIC -shared -o $(sed -e 's/^.\/src/.\/bin/;s/cpp$/so/' <<< $lib) $lib" echo $COMPILE_COMMAND $COMPILE_COMMAND & done