PDA

View Full Version : MSVC linker can't find library



torin
20th June 2013, 22:53
Hi,

I just downloaded latest Qt5 and wanted to build rather simple project that depends on fftw library which I build in VS2010 and copied to my "C:\src\lib" folder.
In Qt project I added "LIB += -Lc:/src/lib -lfftw3-3" and additionally I defined "LIB" environment variable point to this dir, which MS build system understands as additional library dir.

However, I can't compile the project as I always get this linker error:

LINK : fatal error LNK1181: cannot open input file 'fftw3-3.lib'

I guess I'm missing something obvious considering this is my first time with Qt Creator, but I just can't see any other way to set project dependencies except this .pro file which doesn't seem to work for me.

Added after 12 minutes:

Just after I opened this thread I realized that library name didn't match: fftw-3.3.lib vs. fftw3-3.lib
So everything is as expected now.
Hope not to bother you again ;)

Cheers

ChrisW67
20th June 2013, 23:37
The PRO file variable is LIBS not LIB