Results 1 to 15 of 15

Thread: QT Creator Linking issues

  1. #1
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QT Creator Linking issues

    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...

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    What does Qt Creator have to do with this?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation Re: QT Creator Linking issues

    ?????

    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.
    Last edited by sgrant327; 15th December 2009 at 13:55.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    Quote Originally Posted by sgrant327 View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator Linking issues

    QT Creator w/QT 4.5.3

    mingw32-make.exe

    qmake.exe

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

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    How did you add those libs you want to your project?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator Linking issues

    Currently they are added in the PRO file...

    LIBS +=

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

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    Ok, but what comes after "LIBS +="?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Creator Linking issues

    OSG_LIBS = -losgText$${D} \
    -losgGA$${D} \
    -losgFX$${D} \
    ...
    -losg$${D}

    LIBS += $${OSG_LIBS}

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    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?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default

    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...
    Last edited by wysota; 15th December 2009 at 22:06.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    Paste them here please.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #13
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Creator Linking issues

    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)

  14. #14
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default

    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...
    Attached Files Attached Files
    Last edited by wysota; 16th December 2009 at 15:41.

  15. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Creator Linking issues

    fatjuicymole was talking about the libraries you are trying to link against... Can't you just post the error message you are getting?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Customized build (problems, bugs, patches, licencing issues...)
    By Domagoj Saric in forum Installation and Deployment
    Replies: 2
    Last Post: 6th October 2009, 10:48
  2. QTableView Issues with Qt 4.5.3
    By tntcoda in forum Qt Programming
    Replies: 0
    Last Post: 5th October 2009, 20:58
  3. CPU Loading issues
    By arunvv in forum Qt Programming
    Replies: 0
    Last Post: 21st September 2009, 19:22
  4. ethical issues
    By mickey in forum General Discussion
    Replies: 0
    Last Post: 6th May 2009, 11:11
  5. Issues regarding QMySql drivers and mysql database
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2006, 17:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.