How can I add external library into a project built by Qt Creator RC1 (version 0.9.2)? For example, the win32 function EnumProcesses()
requires Psapi.lib
to be added in the project to build.
Thanks in advance.
How can I add external library into a project built by Qt Creator RC1 (version 0.9.2)? For example, the win32 function EnumProcesses()
requires Psapi.lib
to be added in the project to build.
Thanks in advance.
Are you using qmake
projects? If so, you can add an external library using the LIBS
variable. E.g:
win32:LIBS += path/to/Psapi.lib
Hi!! sorry but it doesn´t work, i´m doing this:
LIBS += C:\Program Files\OpenCV\lib
or this:
LIBS += C:\Program Files\OpenCV\cv.lib
but is the same, the error is that the library is not found.
the problem is at the time when a write #include says: No such file or directory
so, Is there someone that can help me???
The proper way to do this is like this:
LIBS += -L/path/to -lpsapi
This way it will work on all platforms supported by Qt. The idea is that you have to separate the directory from the library name (without the extension and without any 'lib' prefix). Of course, if you are including a Windows specific lib, this really doesn't matter.
LIBS += C:\Program Files\OpenCV\lib
won't work because you're using white-spaces in Program Files. In this case you have to add quotes, so the result will look like this: LIBS += "C:\Program Files\OpenCV\lib". I recommend placing libraries in non white-space locations ;-)
hi, i am writing a c++ library and i want to use it for a qt project under linux, windows, mac os X and maemo platform.
can anyone submit a sample project for a library and a project? thanks in advance, lukas
What if I'd like to add a .dll library to my project? It doesn't recognize the format.