<分区>
我在谷歌上搜索了如何静态构建,但我仍在努力运行它。例如这个 Static linking with boost python , 我出错了
/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
我做错了什么?