opencv编译出错 ../../3rdparty/lib/libzlib.a: error adding symbols: Bad value
程序员文章站
2022-07-14 16:38:13
...
…/…/3rdparty/lib/libzlib.a(gzlib.c.obj): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
…/…/3rdparty/lib/libzlib.a: error adding symbols: Bad value
解决办法
根据上面提示的信息编译参数增加 -fPIC
vim 3rdparty/zlib/CMakeFiles/zlib.dir/flags.make