• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 645
  • Last Modified:

Creating MS VC++ 6.0 Makefile from batch file

Hi Experts,

   I have an Ms VC++ 6.0 DLL project and I want to be able to build the project from a batch file.  I have no problem with the building part using the below code,

NMAKE /A /F "MyProject.mak" CFG="MyProject - Win32 Release MinDependency"

but I still have to manually create the Makefile file for it, which kind of defeats the whole purpose of doing the build from a batch file.  I am looking for the commands that I could call from a batch file to generate the Makefile.  Any help would be greatly appreciated!

Thanks a bunch,

axnst2
0
axnst2
Asked:
axnst2
  • 4
  • 3
  • 2
1 Solution
 
axnst2Author Commented:
I need the makefile to write the dependencies as well....
0
 
jkrCommented:
>> I have an Ms VC++ 6.0 DLL project

Load your project, go to the 'Project' menu and choose 'Export Makefile...'. That's it.
0
 
axnst2Author Commented:
Again, I need to be able to do that from a batch file.  I know how to do it from the IDE....
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
axnst2Author Commented:
That's what I meant that I have to do when I said that I have to "manually" create the makefile...
0
 
jkrCommented:
Hm, you are aware that you can build the whole project from the command line without exporting a makefile? See http://msdn.microsoft.com/en-us/library/aa699274%28v=vs.60%29.aspx ("Building a Project from the Command Line"):

msdev.exe MyProject.dsp /MAKE "MyProject – Win32 Debug" /REBUILD
0
 
jkrCommented:
Oh, BTW, if you still ,ainly want to export a makefile, you could use a macro, see http://www.mulveyfamily.com/~katy/VisualC/automate.html#ExportMakefile
Sub ExportMakefile()
  ExecuteCommand "BuildProjectExport"
  Quit ' Quits DevStudio
End Sub

// Run from the command line with:

msdev MyProj.dsw -ex ExportMakefile -nologo

Open in new window

0
 
sarabandeCommented:
to add to jkr's comments:

to see the commandline options of msdev.exe  
0
 
sarabandeCommented:
... continue

type

   msdev /?

in a command window.

Sara
0
 
axnst2Author Commented:
Thanks!  I had no idea you could do that!  That worked great!!!!!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now