Compile VC6 project with makefile

PATH:

Compiler directory, cl.exe, link.exe, nmake.exe, lib.exe …
C:\Program Files\Microsoft Visual Studio\VC98\Bin;
rc.exe for resource compile
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;

makefile file generation:

Function on MS Visual Studio (VC++) 6.0, menu Project -> Export Makefile… , .mak file exported.

Include files:

Code in the .mak file:
CPP=cl.exe CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I “..\..\ps_inc” /I “..\..\al\drv_inc” \D “WIN32″ /D “_DEBUG” /D “_MBCS” /D “_LIB” /D “_WINDOWS” /Fp”$(INTDIR)\testProject.pch” /YX /Fo”$(INTDIR)\\” /Fd”$(INTDIR)\\” /FD /GZ /c .cpp{$(INTDIR)}.obj:: $(CPP) @<< $(CPP_PROJ) $< <<
So modify variable CPP_PROJ to change the compile setting.
For example:
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I “..\..\ps_inc” /I “..\..\al\drv_inc” \ /I “D:\_soft\@microsoft\VS6\install\Program Files\Microsoft Visual Studio\VC98\Include” \ /D “WIN32″ /D “_DEBUG” /D “_MBCS” /D “_LIB” /D “_WINDOWS” /Fp”$(INTDIR)\EMMI.pch” /YX /Fo”$(INTDIR)\\” /Fd”$(INTDIR)\\” /FD /GZ /c

Other:

Notice that link.exe exists in both cygwin/bin directory and system path.

Random posts

  • 天气预报RSS
  • Re: 现在反对wapi的人来说说吧(转寄)
  • 结构式图片生成服务, DayLight SMI2GIF
  • XSLT中的DISTINCT和GROUP
  • Flickr