Results 1 to 14 of 14

Thread: using third party libs

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    60
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: using third party libs

    Happy to see the Quick replies from this forum.

    many thanks for both of you.

    I never included libs in other platforms(MAC and Linux) before.

    Now, I am having only .dll & .lib and a header(.h) files.
    So I should get the equivalent for other OS? ( .so for Linux and .dylib for MAC) ?

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: using third party libs

    yes, then in your pro file, u'll need to make OS specific entries, like:

    win32
    {
    //Libs entry
    }

    unix
    {
    //Libs entry
    }

    mac
    {
    //Libs entry
    }

  3. The following user says thank you to talk2amulya for this useful post:

    jay (3rd April 2009)

  4. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using third party libs

    Quote Originally Posted by jay View Post
    Happy to see the Quick replies from this forum.

    many thanks for both of you.

    I never included libs in other platforms(MAC and Linux) before.

    Now, I am having only .dll & .lib and a header(.h) files.
    So I should get the equivalent for other OS? ( .so for Linux and .dylib for MAC) ?
    that's described in link which I've posted.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. The following user says thank you to spirit for this useful post:

    jay (3rd April 2009)

  6. #4
    Join Date
    Apr 2009
    Posts
    15
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using third party libs

    I am newbie in QT.
    I have a Win32 static lib file without source code and header file and I have to use it in QT.
    I try to make its header file but it seems incorrect and the compiler says "Undefine reference to 'A::A()'".
    I guess I need a tool to generate the header for a static lib to use in QT but I don't know.
    Thanks for any advices from you.

  7. #5
    Join Date
    Jan 2009
    Posts
    54
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using third party libs

    Hello.

    I am trying to include a external lib too, i have read different posts and I have used some alternatives but anyone is working.

    T think the righit way is including the lib as the link http://doc.trolltech.com/4.5/qmake-v...ence.html#libs tells, including the variables as tell this onehttp://www.brindusescu.org/?q=node/26 , and nothing.

    I am beginning to think I should modify the Makefile file. should i do?

    I am using Windows XP, a Qt project on Eclipse and Mingw as compiler.

    Cheers!!

  8. #6
    Join Date
    Jan 2009
    Posts
    54
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using third party libs

    Hi again.

    I am writing LIBS+= c:/library/api_mil.lib to the .pro file of my project and when i built the project the comipiler says :

    cannot find c:/library/api_mil.lib

    Please does anyone know what I am doing wrong?

  9. #7
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using third party libs

    That should be
    Qt Code:
    1. LIBS+= -L"c:/library" -l"api_mil"
    To copy to clipboard, switch view to plain text mode 

  10. #8
    Join Date
    Jan 2009
    Posts
    54
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using third party libs

    I am doing this and I obtaine the following error:

    C:/library/api_mil.lib: file not recognized: File format not recognized

    I am getting crazy!!

  11. #9
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using third party libs

    Oh, you are using Mingw. Mingw expects .a files not .lib. I don't think you can simply link to a lib compiled with MSVC. Somebody please correct me if I am wrong.
    Last edited by spud; 14th April 2009 at 15:45. Reason: spelling error

  12. #10
    Join Date
    Jan 2009
    Posts
    54
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: using third party libs

    Aaahm ok, I can see...

    And there is no way to convert the .lib in a .a? or maybe I could use the dll file of the API which I have it too.

    This is to not change the compiler, because i have all the Eclipse configuration with Mingw.

Similar Threads

  1. Replies: 7
    Last Post: 8th May 2009, 10:26
  2. Linking against different Libs
    By AlphaWolf in forum Qt Programming
    Replies: 3
    Last Post: 10th February 2009, 15:25
  3. problem with order of libs during linking
    By minimax in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2008, 10:32
  4. Including libs on windows
    By ucomesdag in forum Qt Programming
    Replies: 2
    Last Post: 17th August 2007, 08:31
  5. Bad relink libs on QT4 Mac OSX (install_name_tool)
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2007, 09:01

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
  •  
Qt is a trademark of The Qt Company.