编译动态库B时提示被链接的A库需用“-fPIC”重新编译
错误:can not be used when making a shared object; recompile with -fPIC
解决:重新编译A库1
2add_library( A ${SRC})
set_property(TARGET A PROPERTY POSITION_INDEPENDENT_CODE ON)
用代码做有意思的事情
错误:can not be used when making a shared object; recompile with -fPIC
解决:重新编译A库1
2add_library( A ${SRC})
set_property(TARGET A PROPERTY POSITION_INDEPENDENT_CODE ON)