PDA

View Full Version : Problem when using qmake for .vcproj file generation



Conel
4th December 2006, 12:02
Hi,

I have a problem. It seems to be rather simple but I can not find how to solve it

I have my project being compiled under VS2003. I decided to try to compile it with VS2005. So I installed VS2005 and Qt libs for VS2005. And now when I'm trying to generate .vcproj files for VS2005 from my .pro files then I have the following message from qmake in console:

WARNING: Generator: MSVC.NET: Found more than one version of Visual Studio, but
none in your path! Fallback to lowest version (MSVC.NET 2005 (8.0), MSVC.NET 200
3 (7.1))

Does anybody know what is that and how to solve this? Thanks in advance

wysota
4th December 2006, 12:45
The message suggests you have two versions of MSVC installed and qmake doesn't know which one to choose because neither seems priviledged over the other, so qmake generates a project for the one which is older to avoid compatibility problems.

Conel
4th December 2006, 13:34
Thanks

so the next question is how to force qmake to generate .vcproj files for VS2005? Do I need to add something in environmental variables? Or specify some flag for qmake?

Conel
4th December 2006, 14:27
Here is the answer from Trolltech support on this problem

You can fix this quite easily by altering your environment to point to the relevant Qt version. When running from the Qt command shell, you should have one set in the environment. How have you currently set this up, and are you invoking qmake from any of the Qt command shells?

Please add

C:\Program Files\Microsoft Visual Studio 8\VC\bin\

to your PATH environment variable if you're not using one of the Qt command shells from the installed Qt start menu entry.

I can add that adding to PATH this dir reaaly helps so the issue is solved