with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC(-fPIE is not enough)如何验证我的Qt是用-reduce-relocations构建的。
我已经使用CMake配置了使用CMAKE_POSITION_INDEPENDENT_CODE = ON选项的项目,但是在编译可执行文件时,Qt5仍然抱怨我应该使用fPIC。ericniebler/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -fopenmp -O3 -DNDEBUG -fPIEwith position independent code if Qt was built with -reduce-relocations
我正在尝试使用GCC为我的共享库创建一个预编译头文件。在进行了必要的配置并尝试构建之后,我得到了以下警告:经过一段时间的搜索,我发现了这段代码,它似乎表明PCH不能与共享代码一起工作:if= flag_pic)
return _("created and used with different settings of -fpi
我使用NDK 18,并使用x86_64 NDK独立工具链分别编译一个静态库。我可以成功地链接它,但是当我试图以一种非平凡的方式访问库时,我在构建时会遇到数十个错误,比如:
... requires dynamic R_X86_64_PC32 reloc against '_ZZN4seal4util21get_msb_index_genericEPmmE15deBruijnTable64' which may overflow at runtime; recompile with -fPIC</
我试图用GCC gnu编译器为一个项目编译一些GAS代码。下面是我编写它的方法:在使用-fPIC参数编译了kernel.c文件之后,我尝试将其链接到以下命令:
gcc -N -T linker.ldrelocation R_X86_64_32 against '.multiboot' can not be used when making a PIE object; recompile with -fPIC这导致我认为它不是在用-fP
我试图使用Boost和OpenCV中的静态库编译一个共享库。下面是我用来编译库的命令。g++ -fPIC libsaliency.cpp -shared -o libsaliency.so \
-I/home/poiesi/data/libraries/boostrelocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a
relocation R_X86_64_32 against `_nc_globals' can not be used when making a shared object; recompile with -fPIC/libcurses.a: could not read symbols: Bad value
recompile with -fPIC指的是什么,诅咒还是欺骗?然后如何传递-fPIC标志。我尝试过将CFLAGS=-fPIC添加到ncurses & libedit的配置中,但仍然