Link to home
Start Free TrialLog in
Avatar of axnst2
axnst2Flag for United States of America

asked on

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
Avatar of axnst2
axnst2
Flag of United States of America image

ASKER

I need the makefile to write the dependencies as well....
Avatar of jkr
>> I have an Ms VC++ 6.0 DLL project

Load your project, go to the 'Project' menu and choose 'Export Makefile...'. That's it.
Avatar of axnst2

ASKER

Again, I need to be able to do that from a batch file.  I know how to do it from the IDE....
Avatar of axnst2

ASKER

That's what I meant that I have to do when I said that I have to "manually" create the makefile...
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

to add to jkr's comments:

to see the commandline options of msdev.exe  
... continue

type

   msdev /?

in a command window.

Sara
Avatar of axnst2

ASKER

Thanks!  I had no idea you could do that!  That worked great!!!!!