[odb-users] compile error with libodb-qt module

Christian Sell christian at gsvitec.com
Tue Jun 9 08:27:07 EDT 2015


Hello,

I am setting up a fresh development environment with ODB 2.4, Linux Mint 17 and
Qt 5.4.2 (64 bit). Not that this is the fist time that I have done seomething
similar - but this is the first time I see the following error message when
compiling the libodb-qt module:

QtCore/qglobal.h:1052: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 built
with -reduce-relocations. "\

I was able to fix that by setting the CXXFLAGS environment variable to "-fPIC"
before doing the ./configure. However, now when compiling my own code, I am
getting the same message when the ODB compiler is invoked - and I have not been
able to figure out how to mend this. Can anybody hint as to the reason why this
occurs, and how to deal with it?

thanks,
Christian



More information about the odb-users mailing list