tags:

views:

4318

answers:

5

Hello,

I am using qt 4.5

I have created a project and I want to compile on visual studio 2008 for windows mobile 6.0 So I have created the project files doing this:

D:\Projects\Phone_PDA\Phone_PDA>set QMAKESPEC=win32-msvc2008
D:\Projects\Phone_PDA\Phone_PDA>qmake -tp vc

The VS project was created. However, when I try and compile I get this error: LINK : fatal error LNK1181: cannot open input file 'c:\Qt\qt\lib\qtmaind.lib'

However, when I check my librarys and includes under project properties in visual studio. I have this:

Additional Include Directories
c:\Qt\qt\include\QtCore
c:\Qt\qt\include\QtGui
c:\Qt\qt\include
c:\Qt\qt\include\ActiveQt
debug
c:\Qt\qt\mkspecs\win32-msvc2008

Additional Library Directories
c:\Qt\qt\lib

Additional Dependencies
c:\Qt\qt\lib\qtmaind.lib
c:\Qt\qt\lib\QtGuid4.lib
c:\Qt\qt\lib\QtCored4.lib

However, when I browse to the directory c:\Qt\qt\lib all I have is: qtmain.prl and qtmaind.prl However, I don't have qtmaind.lib or qtmain.lib

Many thanks for any suggestions,

+1  A: 

Did you download the source distribution? If so you would need to compile Qt before you get the libs.

See:

My commercial version comes precompiled. If I remember correctly, when I used the open source version I needed to compile everything myself.

Jesse
I am using the commercial version. However, I have performed the same test on another computer that runs the same version of qt, and I got the same problem. When I browse to the C:\Qt\qt\lib I don't have the qtmaind.dll, Thanks.
robUK
There is a commercial source download as well. Sorry, but I can't think of a good reason why the files are not at that location. Do you have the exact name of the file you used to install Qt on the problem machine? I could check that against what I have at work on Monday.
Jesse
Also, not being too familiar with the non-desktop (i.e. wince/windows mobile) installers, it is possible that they do not include those files because the target executable is handled differently on that environment. For example: VS thinks you are trying to create a desktop app (and trying to link accordingly) while your Qt install is targeting a wince app.
Jesse
+2  A: 

Are you sure you are using the correct QMAKESPEC?

I would think you would need to use wince*-msvc2008

See Qt: Supported Platforms

Jesse
+1  A: 

I also have the same problem , iam using the open source version and the .lib files does not exists!!

+1  A: 

Hi, First you have to configure the Qt to your machine to get the libs! It will takes several minutes. Follow the steps in: http://portfolio.delinkx.com/files/Qt.pdf

kataigab
+1  A: 

Open the Visual Studio command prompt (you can find a shortcut in the start menu). It has all the appropriate environment variables set. Go to C:\Qt\20****\qt. Type configure and then nmake.

kkaefer