View Full Version : QT Creator Linking issues

14th December 2009, 21:07
When compiling and linking, I get the 'unresolved reference' errors pointing at '_imp__' functions.

Being a relative noob at QT Creator, could someone please point me at a good tutorial on utilinzing external libs with QT?

Also, the libs & dlls I have been trying to use are the QT OpenSceneGraph libs & Delta3D libs...


14th December 2009, 21:45
What does Qt Creator have to do with this?

15th December 2009, 14:22

Sorry, a bit confused with THAT question.

I am using QT Creator to develop an app...duh?!


This applies to QT (Creator) because I get the unresolved references whenever I try to use external LIBs in the project. I have tried OSGQT, Delta3D for QT, ImageMagick & GraphicsMagick..they all give unresolved reference errors.

I am able to get FreeImage and the Presagis Openflight API libs to play nice....

Just want to know why some work and some don't. If it is a name mangling issue, how do I resolve it?

If it is just my own stupity, then please point me in the right direction...hence the request for some sort of tutorial on using external libs in QT.

15th December 2009, 15:00
I am using QT Creator to develop an app...duh?!
So? What does Creator have to do with linking issues?

So far we don't even know what compiler nor project manager you are using.

15th December 2009, 15:59
QT Creator w/QT 4.5.3



Attempting to build on WinXP. All I did was install QT Creator and start coding. Nothing special.

15th December 2009, 17:07
How did you add those libs you want to your project?

15th December 2009, 17:54
Currently they are added in the PRO file...


The project I am trying to compile right now is the QOSWidget.

15th December 2009, 20:24
Ok, but what comes after "LIBS +="? :)

15th December 2009, 21:28
OSG_LIBS = -losgText$${D} \
-losgGA$${D} \
-losgFX$${D} \


15th December 2009, 22:50
And what are the undefined references you are getting? Do the classes in the libs contain proper export macros for Windows? Are you sure the linker does actually find the libraries you link against?

15th December 2009, 22:55
Not sure, not sure, not sure...

That is why I was asking for some sort of tutorial...

The undefined ref's appear to have the names mangled.

Thant is all I know...

15th December 2009, 23:07
Paste them here please.

15th December 2009, 23:50
Compare the undefined references with the names actually in the library files. They will be mangled if they are C++ libraries, and in that case, you have to use a compiler which uses the same mangling scheme (so for example, MSVC libs will not work with GCC/QtCreator without a lot of work)

16th December 2009, 14:46
I assume you mean that I can't use the mingw32-g++ compiler, I should use the VC compiler?

The attached ZIP contains the QOSGWidget...in it's unadulterated form.

Only thing I changed was the location of my OSG structure...

16th December 2009, 16:42
fatjuicymole was talking about the libraries you are trying to link against... Can't you just post the error message you are getting?