relocation R_X86_64_TPOFF32 against symbol `_ZN11clmdep_asio6detail15keyword_tss_ptrINS0_10call_stackINS0_15task_io_serviceENS0_27task_io_service_thread_infoEE7contextEE6value_E' can not be used when making a shared object; recompile with -fPIC

原因是项目使用的是-fPIC ,而生成静态库时没有加 -fPIC 选项

在cmakelist中加上add_compile_options(-fPIC)即可。

Logo

一站式 AI 云服务平台

更多推荐