views:

891

answers:

2

I have Qt 2009.05 and Qt VS Add-in 1.1.3 installed on my computer with Visual Studio 2008. When I create simple Qt Application and build it, I'm receiveing this error.

1>LINK : fatal error LNK1181: cannot open input file 'qtmain.lib'

When I searched whole disk this file to add in Visual Studio library include variable, I doesn't find. I have qtmain.prl in my qt/lib directory but not qtmain.lib...

+3  A: 

Your qt\lib directory should contain all the lib files. You have probably downloaded qt source package but you haven't built it. Download pre-built version for Visual Studio from here.

Nikola Smiljanić
Indeed. Th qt/lib dir also contains a README saying "if this dir is empty, you probably didn't build Qt" or something similar.
Marcus Lindblom
I have downloaded from here: http://get.qt.nokia.com/qtsdk/qt-sdk-win-opensource-2009.05.exe it is compiled windows version.
Toktik
qt/lib is not empty, there is .prl files instead .lib files. I'm in C:\Qt\2009.05\qt\lib directory.
Toktik
+1  A: 

The problem I have fixed. Problem was that I have installed MinGW version of Qt. I downloaded VS2008 version and Addin for VS2008. Now works!

Toktik