0
/other/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qglobal.h:1079:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."

似乎所有组件都被正确读取,但弹出此错误。我需要在 CMAKE 中进行哪些更改才能更正此问题?

我将这些行放入CMakeLists.txt

SET(CMAKE_CXX_FLAGS "-g -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
   ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")

但这也不能解决问题。

4

0 回答 0