What is the solution of this error?
-
-
@hskoglund said in What is the solution of this error?:
Hi, check that you've #included "qglobal.h" in all .cpp files. (That's where the qt_version_tag is defined.)
Henry, you've mentioned this before, so I went on and checked. It doesn't matter whether you include
<QtGlobal>
as the versioning tag is generated only when Qt's compiled (which I suspected, hence the double-check ;)). See here (notice theifdef
) and here (note theextern const char *
that's built with the macro). However I do believe you were right the first time and the error is popping up because of binaries that are incompatible (it was when I encountered it).@mit_cruze said in What is the solution of this error?:
THanks but still no luck!
As @hskoglund says, make sure you're not mixing up Qt builds.
-
@kshegunov Yes, you're right, I wasn't checking when/where the versioning tag is defined. Slightly confused, that error above:
... undefined reference to `qt_version_tag'
is a linking error, right? But the similar error you got before, wasn't that when you tried to start you app? -
@hskoglund said in What is the solution of this error?:
Slightly confused, that error above: ... undefined reference to `qt_version_tag' is a linking error, right? But the similar error you got before, wasn't that when you tried to start you app?
Yes I got it on loading, because I had unintentionally substituted the binaries my application is linked to.
As for your first question:
There's little distinction on Linux as the symbol resolution will be actually done at run-time (in contrast to Windows); and that's one big mother of a pitfall. :)