# Migrating to Visual studio 2010 (wtf error)

## Recommended Posts

Scarabus2    560
I just installed Visual studio 2010 and is in the process of migrating my project, but I can't compile. In fact I can't compile anything at all. It seems to get the filenames all wrong: LINK : fatal error LNK1181: cannot open input file 'ÿþ/.obj' I reinstalled Visual studio, picked default settings and created a vanilla Visual C++ project. I added a single file: test.cpp and tried to compile, but get the same error. This is the output. Any ideas? Google turned up nothing.
1>------ Build started: Project: test2, Configuration: Debug Win32 ------
1>Build started 2010-04-26 22:41:07.
1>ClCompile:
1>  Microsoft (R) Incremental Linker Version 10.00.30319.01
1>
1>  /out:.exe
1>  ÿþ/
1>LINK : fatal error LNK1181: cannot open input file 'ÿþ/.obj'
1>  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
1>
1>  cl  ■/
1>
1>CL : Command line warning D4024: unrecognized source file type ' ■/', object file assumed
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.62
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

##### Share on other sites
karwosts    840
Seems like a full uninstall/reinstall might be the best idea :S

##### Share on other sites
I like how microsoft all-caps, "FAILED".

##### Share on other sites
Evil Steve    2017
What does the project file look like if you open it in a text editor? Is it gibberish too, or is there text there? And is it ANSI or Unicode?

##### Share on other sites
Scarabus2    560
Project file looks fine. I made a new project from scratch in 2010 and got the same error.

##### Share on other sites
Moe    1256
Is it possible that is some language related problem? What is your computer set to, for language and regional settings?

##### Share on other sites
Nypyren    12063
I've seen this occur with a 360/PC project when the PC compiler was accidentally called to compile a 360 project.

Other Google results for that exact error seem to indicate that it's a problem with having multiple versions of the linker.

Did you upgrade from a VS2010 beta or RC? If so, you should see if there's some kind of registry-cleaning tool you can find for it to TOTALLY remove it.

##### Share on other sites
Scarabus2    560
I installed it from disc. I have VS2005 and 2008 installed on the same machine. I uninstalled 2005, but the problem remained. Do I really have to uninstall 2008 as well? I'm reluctant to do that until I know for sure that 2010 can replace it.

##### Share on other sites
daviangel    604
Quote:
 Original post by Scarabus2I installed it from disc. I have VS2005 and 2008 installed on the same machine. I uninstalled 2005, but the problem remained. Do I really have to uninstall 2008 as well? I'm reluctant to do that until I know for sure that 2010 can replace it.

You can have multiple versions of VS installed on same system and it's officially supported. I have VS2008 and VS2010 installed on my main PC right now without any problems. What does seem to cause problems though is if you ever installed beta or rc versions of VS and didn't uninstall them completely and try to install RTM version then that seems to cause problems.

##### Share on other sites
Scarabus2    560
Ah, I see. I did install the Beta before. I think that I uninstalled it, but now that I think about it I'm not so sure. I will investigate.

##### Share on other sites
Going by googling the version numbers that appears to be the VS2010 linker, but the VC6 compiler! Note the copyright date of "1984-1998".

##### Share on other sites
Scarabus2    560
So the question is, how do I keep VS2010 from using a decade old compiler?

##### Share on other sites
Uninstall it? ;)

If it's not installed try searching your drives for "cl.exe". Hopefully you'll find one that doesn't belong to 2008 or 2010.

I'd suspect it's picking it up because the folder it's in is referenced in the PATH environment variable.

##### Share on other sites
Scarabus2    560
Ran a computer-wide search for cl.exe and found a stray one in System32. Now who the heck put that there?!

Thanks to everyone who guided me in the right direction.