Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Cannot Compile Defualt Console Application on Fresh Installs of VS2012 or VS2010

$
0
0

I am trying to help my friend set up Visual Studio 2012 on his computer (Windows 7).  He is not a developer.  He installed VS2012 with no problems but when he makes a new console application and runs it (without modifying anything) he gets the following error:


Build started 6/7/2013 11:08:46 PM.
     1>Project "C:\Users\Kevin\documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.vcxproj" on node 2 (Build target(s)).
     1>ClCompile:
         C:\Windows\system32\CL.exe /c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"Debug\ConsoleApplication1.pch" /Fo"Debug\\" /Fd"Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt stdafx.cpp
         Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
         Copyright (c) Microsoft Corp 1984-1998. All rights reserved.
         
         cl  ■/
         
     1>CL : Command line warning D4024: unrecognized source file type ' ■/', object file assumed
         Microsoft (R) Incremental Linker Version 11.00.50727.1
         Copyright (c) Microsoft Corporation.  All rights reserved.
         
         /out:.exe
         ÿþ/
     1>LINK : fatal error LNK1181: cannot open input file 'ÿþ/.obj'
     1>Done Building Project "C:\Users\Kevin\documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.vcxproj" (Build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:00.56

It is odd that it is using "C:\Windows\system32\CL.exe" for the compiler and not the one in the VS install directory (which is what it does on my system).  I checked his path and nothing looks odd there.  It is as if VS installed incorrectly so that it cannot locate the correct cl?  We tried repairing the install, uninstalling and re-installing, updating VS, putting the VS cl location in his path - nothing seems to make a difference.

We also tried doing the exact same thing with a fresh VS2010 install and got the same results:

Build started 6/8/2013 9:42:11 AM.
     1>Project "c:\Users\Kevin\documents\visual studio 2010\Projects\Test\Test\Test.vcxproj" on node 2 (build target(s)).
     1>PrepareForBuild:
         Creating directory "c:\users\kevin\documents\visual studio 2010\Projects\Test\Debug\".
       InitializeBuildStatus:
         Creating "Debug\Test.unsuccessfulbuild" because "AlwaysCreate" was specified.
       ClCompile:
         C:\Windows\system32\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"StdAfx.h" /Fp"Debug\Test.pch" /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt stdafx.cpp
         Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
         Copyright (c) Microsoft Corp 1984-1998. All rights reserved.
         
         cl  ■/
         
     1>CL : Command line warning D4024: unrecognized source file type ' ■/', object file assumed
         Microsoft (R) Incremental Linker Version 10.00.30319.01
         Copyright (c) Microsoft Corporation.  All rights reserved.
         
         /out:.exe
         ÿþ/
     1>LINK : fatal error LNK1181: cannot open input file 'ÿþ/.obj'
     1>Done Building Project "c:\Users\Kevin\documents\visual studio 2010\Projects\Test\Test\Test.vcxproj" (build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:01.32

If anyone has any ideas why this is happening please let me know!  Thanks!


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>