/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}")
但这也无法解决问题。