我使用的是Ubuntu16.04,cmak3.10.1,QT5.6.2。当我编译我的代码时,会出现错误。with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC如何验证我的Qt是用-reduce-relocations构建的。
在我的CmakeLists.txt文件中,我用了行就这样,我遇到了一个错误
"You mustwith position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC然后我意
假设我希望为一个具有三个libs/target的项目编译所有使用target的代码。应用旗标项目的最佳实践是什么?我可以想到两种方法:
将TARGET_COMPILE_OPTIONS(C PUBLIC "\W4")设置在C的CMake中(这是整个项目的核心库),依赖于C的所有其他库都将通过:TARGET_LINK_LIBRARIESCon:项目的编译标志是隐式<e