VS2010 Issue. Project in 64 bit mode won't find Qt version, setting Qt Version reverts project to Win32.
-
This is a really strange issue I've been hammering at for a bit. Attempting to set up the project on a 64-bit Win7 machine. This issue occurs in all Qt projects including a brand new project.
I set the project as a x64 project. When I go to build I get the following error:
"WARNING: Can't find the Qt version that's associated with this project. Defaulting to 4.7.2 instead. Please assign a valid Qt version to this project in the Qt project settings."I then go into Qt>Qt Project Settings and notice that the "Version" is blank. I then set it to Qt 4.7.2 (my current version). Upon doing this and clicking 'Ok' my project is reverted to run in a Win32 format. Is there a way to get around this? I've tried re-installing and rebuilding everything multiple times.
-
I only had a 64x bit installation configured, but it was finding 32 bit stuff and only 32 bit stuff. Tried uninstalling/reinstalling. Tried deleting all remnants and Qt directories. The eventual fix was to take a set up that was working on a different machine and replace my setup's libraries and various files with their version and now it seems to be working.
-
We check the Qt Core library itself for the word with (starting with Qt Creator 2.2 that is), so if creator says it is a 32bit binary it most likely is. Would have been interesting to examine your broken setup... is there any chance that you still have the QtCore.dll around in backups, etc. somewhere?
-
I don't know if you have solved this problem. I was having the exact same issue and I found a work around. However it requires having Visual Studio 2008 as well as VS 2010. My work around is this:
- Create a new Qt Application Project
- Create a X64 configuration for the project and set it as active
- Attempt to build it and you will get one or more:
WARNING: Can't find the Qt version that's associated with this project. Defaulting to Qt 4.7.1 instead. Please assign a valid Qt version to this project in the Qt project settings.
Try to set this with: Right Click->Qt Project Settings
It will always switch back to a 32 bit build no matter what you do.
-
Now the fun part: edit test.vcproj look for the entry:
<Global
Name="QtVersion Win32"
Value="Qt 4.7.1 64Bit"
/> -- this will be name what ever you defined it as
and DELETE IT.
- Save the project file.
- Reload the project file into the solution. It should detect the change and ask you to reload.
- Now <Right Click> -> Qt Project Settings has changed to "change project's Qt Version".
- Set the correct Qt Version (in my case Qt 4.7.1 64Bit).
- Now you can build it. Optionally import it into Visual Studio 2010