欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

opencv编译出错 ../../3rdparty/lib/libzlib.a: error adding symbols: Bad value