4

I need to be able to compile a visual studio 2005 c++ project from the command line. I have found this post in the SOF archives but it does not seem to help me solve my problem. I am not able to find neither msbuild or vcexpress. Can someone point me to where they must be or is there a different command for visual studio 2005?

What I need is to create a batch file that does the compiling.

Community
  • 1
  • 1
Ivaylo Strandjev
  • 69,226
  • 18
  • 123
  • 176
  • 2
    Assuming you want to build a solution the command would be devenv /Build YourSolution.sln as noted in the second answer in your link. – Retired Ninja Jan 02 '12 at 08:45

2 Answers2

2

Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt.

To open the Windows SDK Command Prompt window (Windows SDK version 6.1 or later): Click Start, point to All Programs, point to Microsoft Windows SDK , and then click SDK Command Prompt or CMD Shell.

And read How to: Compile a Native C++ Program from the Command Line in Visual Studio

Alexander Abashkin
  • 1,187
  • 4
  • 13
  • 18
1

You're looking for cl.exe.
But, ehm, batch file? Don't you mean makefile?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
  • Hmm maybe the word compiling was a bit confusing. I need to create a batch file that creates an .exe from the project and then do some stuff with it. – Ivaylo Strandjev Jan 02 '12 at 08:45
  • when I try to run cl.exe I get the error "The application failed to run because mspbd80.dll was not found." I could not find such dll anywhere in the installation folder of vs 2005. – Ivaylo Strandjev Jan 02 '12 at 08:50
  • Then you may have a configuration error. You could try re-running vcvarsall.bat. By the way, it's called mspdb80.dll. – Mr Lister Jan 02 '12 at 13:20