[CMake] Problem with Visual Studio 2010, Windows 7 64bit

Titus von Boxberg titus at v9g.de
Wed Nov 28 08:12:19 EST 2012


Am 28.11.2012 13:59, schrieb Michael Jackson:
>
> On Nov 28, 2012, at 7:37 AM, David Doria <daviddoria at gmail.com> wrote:
>
>> On Wed, Nov 28, 2012 at 4:22 AM, Andrew Maclean
>> <andrew.amaclean at gmail.com> wrote:
>>> Interesting ... I have no problems, the only thing I can think of is that I
>>> had VS 2010 SP1 installed before I installed VS 2012 Express, I did not use
>>> any of the RC versions.
>>
>> Petr,
>>
>> A colleague mentioned that with the same setup he was getting the same
>> error, and then installed SP1 for VS 2010 and things started working.
>> It would really be great if there were better checks/errors because it
>> is really a huge barrier for projects like VTK to get users to fight
>> through install problems. "Hey you should use VTK for that" works when
>> they have to follow a few instructions and it works, but when they
>> have to spend days working through cryptic errors most tend to give up
>> and then we lose a user.
>>
>> Andrew,
>>
>> I'm almost certain that it will never work using the VS generators
>> (with very different "can't find the compiler type of errors") unless
>> you run cmake-gui from a terminal unless you have manually added many
>> VS things to the system environment variables. At least that has been
>> my experience on many machines.
>>
>> David
>> --
>
>
> Here is my theory on mixing visual studios. When you install Visual Studio Windows will dutifully add the Visual Studio tools to the PATH for everyone. This is why you can just launch CMakeGui and have the Visual Studio generators work correctly. All is well. This is where I ran into problems.. Now install Visual Studio 2012 (or any other version) alonside VS2010 and Windows will again the 2012 to the PATH also. Now you have BOTH VS version's tools in the path but what ever is found FIRST is the one that is going to be used which will cause problems when launching CMakeGUi from Windows Explorer. At least this is what I saw years ago and why I NEVER mix versions. I install each version into its own Virtual Machine and run that way. It avoids all of these PATH issues.
>     Unless CMake has some code to look into the registry to fully determine which compiler you want and setup the environment correctly by removing PATHS from a version of Visual Studio that you are NOT using I don't see how having more than a single Visual studio installed is going to work***

I doubt your theory ;-)
VS installer does not insert VS tools into the PATH.
That's one reason why you have the vsvars-batch files to set up the
environment.

Another source of my doubt is that I also can confirm that the problems
with VS 2010 vanished after installing VS2010 SP1.

Regards
Titus



More information about the CMake mailing list