I googled around how to build statically but I am still struggling to run this. For example this Static linking with boost python, I am getting errror
/python_boost$ g++ -o hello.o -c hello.cpp -Wall -fPIC -I/usr/include/python2.7 /python_boost$ g++ -shared -o libhello.so hello.o -lpython2.7 /usr/lib/x86_64-linux-gnu/libboost_python.a /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_python.a(from_python.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/lib/x86_64-linux-gnu/libboost_python.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status
What am I doing wrong?