0

I want to build many c++ projects in Windows 7, however building them one by one seems fantastic.

Then, I thought to write NMAKE file manually and run some script, but it seems also troublesome because I have to write many NMAKE files.

So I want to know is it possible to generate NMAKE file automatically from Visual Studio 2010.

mine
  • 11
  • 2
  • Why do you think running nmake is going to be significantly different than building a solution? What is it you don't like about building in VS2013 that might help you? – Michael Edenfield Jul 05 '14 at 20:14

3 Answers3

1

Starting with Visual Studio 2002, there is no longer a way to export your VC++ project files to a Makefile. (That option existed up until VC++ 6.0 but was removed.)

As of VS 2010, the build process for VC++ projects is the same as any other projects: there is a solution file and a set of project files, both of which are recognized by MSBuild as inputs. MSBuild take care of the dependency resolution, build ordering, etc.

The only significant feature that you lose building inside the IDE is parallel builds. If that's your concern, you can run the msbuild command on your solution file and pass in the /m parameter to specify how many simultaneous builds it should attempt.

As far as I know, no one has built any kind of tool or plug-in to parse the .vcxproj files and spit out a makefile, though the file format is pretty well documented XML, so you could always write one yourself. Otherwise, if you really need makefiles for some reason, you'll have to craft them by hand.

Michael Edenfield
  • 27,188
  • 4
  • 77
  • 114
0

You can use MSBuild to build a Visual Studio solution or project from the command line.

Oktalist
  • 13,098
  • 1
  • 38
  • 56
0
  1. Convert it to CMake https://stackoverflow.com/a/9387350/525578
  2. Generate using NMake or Jom generator of the CMake
Serg
  • 3,054
  • 1
  • 31
  • 45