Re: using third party libs
will QLibrary class help me for doing this?
Re: using third party libs
Quote:
Originally Posted by
jay
1. can anyone help me to how to include these libs with my Qt application.
Windows: adding LIBS += <lib name> into the .pro file is enough?
yes, this is enough for all platform. read this. then you need to include needed h-file in your sources for using objects from 3d-party library.
but this approach is ok when you have static library and dynamic link library.
if you have olny dynamic link library then you have to use QLibrary.
Re: using third party libs
its better to add the entries in the pro file. Here's how:
Code:
LIBS += -L"PathToLibDirectory" -l"libraryName"
this will work on all OS. Hail the Qt!
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) ?
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
}
Re: using third party libs
Quote:
Originally Posted by
jay
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.
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.
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!!
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?
Re: using third party libs
That should be
Code:
LIBS+= -L"c:/library" -l"api_mil"
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!! :eek:
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.
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.