[Qt-interest] silly library question
Pascal Patry
iscy at invalidip.com
Thu May 5 17:45:48 CEST 2011
On Thursday, May 05, 2011 10:47:30 R. Reucher wrote:
> Hi!
>
> I've had similar issues with one of my projects, with also need to link to
> SDL and ZLIB...
>
> I finally figured that you need to specify the .lib file, not just the
> directory where the .lib and .dll files reside! Example:
>
> LIBS += C:\curl-7.21.6-devel-mingw32\lib\curl.lib
This is not the correct way it should be done. What you should have is
this:
LIBS += -LC:\curl-7.21.6-devel-mingw32\lib -lcurl
if you notice, -L is the prefix for paths and -l is the prefix for the
actual library. This way it will work better on all platforms. You can
just add a different path using -L in win32{} directives or unix{} and
keep the -l in the global directives of your .pro
> I don't know if forward or backward slashes make a difference here, I've
> use back-slashes... also, I use a script to produce the .vcxproj file for
> VS 2010 and specify the "LIBS += ..." statement on the qmake command line,
> not in the .pro file, but I don't think it matters.
>
> HTH, René
More information about the Qt-interest-old
mailing list