Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Generate NMAKE Makefile from VC++ project?

Posted on 2009-03-30
6
Medium Priority
?
2,907 Views
Last Modified: 2013-12-14
Is there a quick way to generate a valid makefile for nmake given an existing Visual C++ project? I'm using VS 2008.
0
Comment
Question by:mrjoltcola
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 800 total points
ID: 24023121
I beleive not.  VS6 had an "Export Makefile..." menu item, but Microsoft has changed to the MSBuild technique.
If all you want is a command-line way to do a build, you can use something like:
   MSBuild /target:Debug myproject.csproj
See:
   MSBuild Reference
    http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 800 total points
ID: 24023203
From http://social.msdn.microsoft.com/forums/en-US/msbuild/thread/7a572ada-edfc-4c85-ab35-0bdd5352b17c/
> In older VS versions, I could generate Makefiles from the project.

We cut this feature in VC7 because it was a bug farm and we couldn't get
it to work properly without fundamentally changing the feature. The more
I get feedback on this, though, the more I get convinced that may be
this was not the right decision :(

0
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 1200 total points
ID: 24031668
>>>> If all you want is a command-line way to do a build,

For VC compiling it is vcbuild and not msbuild (I hope they didn't change it from VS2005 cause I actually didn't use it for VS2008 projects til now).

You'll get the possible options by typing

   vcbuild /?

at the command prompt.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24031722
The vcbuild is quite mighty and I didn't miss the nmake. In VC6 we were used to generate makefiles from dsp project files which indeed was a 'bug farm' and I was really happy when we ported to VC8 and vcbuild and dropped the OS/2 branch which was the major reason for using makefiles.
0
 
LVL 40

Author Comment

by:mrjoltcola
ID: 24031779
Thanks guys, my main problem is maintaining this for open source projects. On UNIX I used to use autoconf, and it may very well support nmake, but I doubt it.

Secondly, trying to run vcvars32.bat to get the right environment involves either asking the user, or detecting it, so I am just trying to figure out the best approach.

It would seem someone would have written a tool, by now, to export a makefile.

Anyway, to the answers, vcbuild will do for now. I will just continue to maintain a separate makefile for UNIX, and possibly will write a Perl script to generate one from the project file at some point.

Points to both of you!
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24032191
>>>> I will just continue to maintain a separate makefile for UNIX

Yes, I did the same for a dll project at Windows/VC7 and AIX/xlC and - though I made the AIX makefile programatically by evaluating the source files from vcproj it actually was *not* a conversion of a vcproj to a unix makefile but something very much less, i. e. updating the list of source files in an existing unix make file. And I don't think that more is senseful.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question