Results 1 to 4 of 4

Thread: Linking to libraries

  1. #1
    Join Date
    Jul 2010
    Posts
    72
    Thanks
    35
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Linking to libraries

    Hello,

    I am trying to link a library to Qt creator (http://www.ambiera.com/irrklang/). I have already added the .h files to the Qt directory. I have also added the path where the .lib file is to the .pro file using the following syntax:

    LIBS += \
    C:\path\irrKlang.lib

    After this procedure, Qt won't compile giving the following error:

    undefined reference to `_imp___ZN8irrklang20createIrrKlangDeviceENS_21E_S OUND_OUTPUT_DRIVEREiPKcS2_'

    Any idea what is missing?

    Thank you

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Linking to libraries

    Not a real expert with Windows here, but doesn't QMake expect paths to always use a forward slash as a delimiter?

    The error indicates that your library isn't being found.

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Linking to libraries

    ...and if your real path has spaces you have to use $$quote().

  4. #4

    Default Re: Linking to libraries

    Hi
    It seems that the library is linked properly,but you are using some function which is not defined.I think you are linking an old version of the mentioned library ,but the included header is from the latest version.and thats y you didnot get any compilation error.

Similar Threads

  1. Replies: 4
    Last Post: 22nd May 2011, 13:36
  2. Replies: 0
    Last Post: 13th October 2010, 20:28
  3. Linking Third party Libraries
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 13th October 2009, 06:18
  4. Problem when linking with own static libraries
    By herveT in forum Qt Programming
    Replies: 4
    Last Post: 6th May 2009, 08:23
  5. linking libraries
    By JustaStudent in forum Newbie
    Replies: 29
    Last Post: 2nd May 2006, 08:30

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.