/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgflags.a: 无法添加符号: 错误的值
collect2: error: ld returned 1 exit status
make[2]: *** [../lib/libcamodocal_gpl.so] Error 1
make[1]: *** [src/gpl/CMakeFiles/camodocal_gpl.dir/all] Error 2
make: *** [all] Error 2
src/gpl/CMakeFiles/camodocal_gpl.dir/build.make:196: recipe for target '../lib/libcamodocal_gpl.so' failed
CMakeFiles/Makefile2:285: recipe for target 'src/gpl/CMakeFiles/camodocal_gpl.dir/all' failed
Makefile:83: recipe for target 'all' failed
16:25:16: The process "/usr/bin/cmake" exited with code 2.
Error while building/deploying project camodocal (kit: Desktop)
When executing step "CMake Build"
解决方法
add_library(camodocal_chessboard Chessboard.cc)时 不要加SHARE参数