On Linux (not sure about Windows or Mac):
g++ test.cpp $(pkg-config --cflags --libs Qt5Core) -g
should be
g++ test.cpp $(pkg-config --cflags --libs Qt5Core) -fPIC -g
because otherwise the compiler complains:
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)."
Hi, thanks for this very useful project!
On Linux (not sure about Windows or Mac): g++ test.cpp $(pkg-config --cflags --libs Qt5Core) -g should be g++ test.cpp $(pkg-config --cflags --libs Qt5Core) -fPIC -g
because otherwise the compiler complains:
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)."