c++ - static link boost with g++ on MacOS -


i'm building project in c++ using fltk toolkit , have included boost libraries serialisation , statically link them cannot guarantee existence of boost libraries on other machines.

i re-ran install commands boost download so:

sudo ./b2 link=static sudo ./b2 install link=static 

and compiling project so

g++ `fltk-config --use-forms --use-gl --use-images --ldflags --cxxflags` xxxx.cpp  -l/opt/local/lib/ -wl, -bstatic -lboost_iostreams -lboost_serialization -wl, -bdynamic -o program_name 

but failure , output

ld: file not found:  collect2: ld returned 1 exit status 

i'm not sure here, have guidance?

you have space in -wl, -bstatic. remove space, e.g. -wl,-bstatic.

same applies -wl, -bdynamic.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -