When building a trivial test case the following error appears:
% g++ -O2 -W -Wall -g $(pkg-config --cflags Qt5Widgets) -c foo.cc
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:37:0,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:37,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1067:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
# error "You must build your code with position independent code if Qt was bui
^
Why isn't -fPIC included in the cflags?
MfG
Goswin