Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a static build to include libboost* #116

Open
cryptoBOOOOM opened this issue May 27, 2018 · 1 comment
Open

Make a static build to include libboost* #116

cryptoBOOOOM opened this issue May 27, 2018 · 1 comment

Comments

@cryptoBOOOOM
Copy link

How can i make a static build so i do not have to ship libboost libraries?

./forknoted: error while loading shared libraries: libboost_system.so.1.58.0: cannot open shared object file: No such file or directory

@jojapoppa
Copy link

Define BOOST_ROOT in your environment.
Then, add this near the top of your CMakeLists.txt file:

set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++")
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(BUILD_SHARED_LIBS OFF)
set(STATIC ON CACHE BOOL "Link libraries statically")
set(BOOST_THREAD_LIBRARY boost_thread)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants