ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.73k stars 1.99k forks source link

Error MSB6006 when compiling code with Visual Studio Community 2013 #373

Closed BenMarriner closed 8 years ago

BenMarriner commented 8 years ago

Hey guys,

I have been unable to compile the source code since I got a fresh copy of the code. The everything.sln solution doesn't work and neither does the games.sln solution. I am using Windows 7 Ultimate 64-bit. Everytime I try to build the solution, it pops up with "error MSB6006: "cmd.exe" exited with code 3" written 27 times in the error list.

Can somebody please help me? Thanks, Goolog.

TomyLobo commented 8 years ago

Did you run vpc again?

vpc-generated projects do some checksumming before compilation. if the checksum doesnt match, it will fail the build.

Not sure why you'd only get an error MSB6006: "cmd.exe" exited with code 3 though...

BenMarriner commented 8 years ago

How do I run VPC?

TomyLobo commented 8 years ago

You should have run VPC before you even had .sln files. The SDK comes with batches that run VPC to create them.

BenMarriner commented 8 years ago

Did you mean the createallprojects and creategameprojects bat files? If so, it said all the projects pass the CRC check.

TomyLobo commented 8 years ago

i'm out of ideas... post screenshots and/or more details about what your code structure looks like

BenMarriner commented 8 years ago

So I've got photos of VPC creating everything projects and game projects. And some photos of the build failing for each project.

desktop 05 17 2016 - 07 26 35 08 desktop 05 17 2016 - 07 25 57 06 desktop 05 17 2016 - 07 22 04 03 desktop 05 17 2016 - 07 27 17 10

yaakov-h commented 8 years ago

What's the command and output from the Build log?

BenMarriner commented 8 years ago

Here is a link to the compile log for the everything.sln, the build output is set to normal http://pastebin.com/DCdH4AsF

And same with the games.sln http://pastebin.com/xmn8zkce

yaakov-h commented 8 years ago

The system cannot find the path specified.

Check what it's looking for. You'll probably find your answer there.

BenMarriner commented 8 years ago

I checked, the file is there desktop 05 17 2016 - 21 04 37 11

TomyLobo commented 8 years ago

this rings familiar, did you install a c++ compiler with your IDE?

BenMarriner commented 8 years ago

Yeah. I installed everything when I installed Visual Studio 2013. I'm using community by the way.

TomyLobo commented 8 years ago

Can you create a C++ hello world project and see if that compiles ok?

BenMarriner commented 8 years ago

I just tested it. It works when compiling a hello world project.

TomyLobo commented 8 years ago

Out of ideas again then, sorry. I personally use MSVC++2010

dotn3b commented 8 years ago
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 3.

Microsoft.CppCommon.targets is not the file it's failing to find. It's part of what's executing the code that is trying to access whatever file. The numbers in the parentheses indicate the line and column. The file it's actually looking for is not mentioned in the debug output.

Your issue is likely due to your project path containing spaces and/or possibly the '&' character. Judging by your logs, issue #239 might be relevant to you. Specifically the last line with the *.vpc.sentinel file in that custom build step.

If that's your exact issue and you fix it (for every project) you may run into further issues of that kind down the line. In case something else is wrong it's probably still related to your project path. If you struggle with this perhaps the easiest solution to simply change the path.

Ideally a project's path shouldn't be a problem in the first place but seeing multiple issue reports pertaining to the matter I guess it still is.

BenMarriner commented 8 years ago

So I changed my project path by deleting the source code and re-cloning it in a new directory without spaces or the '&' character (my previous directory contained both of these). I recompiled under the Release configuration and it seems to have worked apart from 6 errors.

I have a link to all the errors that popped up in the Error List. http://pastebin.com/ygktgG1p

The projects that stuffed up still were: Captioncompiler Height2normal Glview Phonemeextractor Motionmapper QC_Eyes

Does it matter if this happens

BenMarriner commented 8 years ago

I'm sure this doesn't matter. The mod still works now. Thank you for all your help and suggestions. Appreciate it!

I will now close this issue.

dotn3b commented 8 years ago

Yeah, all you will likely ever need to compile (because you actually edit the code) is what you get from creategameprojects. All those tools you've mentioned come precompiled in the 2013 SDK Base and you may never even use them.

BenMarriner commented 8 years ago

So the createallprojects solution is more for modifying the Source SDK Base 2013 engine and creating mods off of that. And the creategameprojects solution is for creating mods on just the normal Source SDK Base 2013 and modifying the mod itself?