这个问题我查了很多资料,都是简单的提了一下。哪位知道具体的使用方法,帮我一下,谢谢了!

解决方案 »

  1.   

    进入Command方式下,设置MSVC编译环境:c:\>cd sample
    c:\sample>vsvars32.bat
    c:\sample>nmake sample.mak下面等它编译,具体nmake的参数参考MSDN
      

  2.   

    NMAKE options are described in the following table. Options are preceded by either a slash (/) or a dash (–) and are not case sensitive. Use !CMDSWITCHES to change option settings in a makefile or in Tools.ini.Option Action 
    /A Forces build of all evaluated targets, even if not out-of-date with respect to dependents. Does not force build of unrelated targets. 
    /B Forces build even if timestamps are equal. Recommended only for very fast systems (resolution of two seconds or less). 
    /C Suppresses default output, including nonfatal NMAKE errors or warnings, timestamps, and NMAKE copyright message. Suppresses warnings issued by /K. 
    /D Displays timestamps of each evaluated target and dependent and a message when a target does not exist. Useful with /P for debugging a makefile. Use !CMDSWITCHES to set or clear /D for part of a makefile. 
    /E Causes environment variables to override makefile macro definitions. 
    /F filename Specifies filename as a makefile. Spaces or tabs can precede filename. Specify /F once for each makefile. To supply a makefile from standard input, specify  a  dash (–) for filename, and end keyboard input with either F6 or CTRL+Z. 
    /HELP, /? Displays a brief summary of NMAKE command-line syntax. 
    /I Ignores exit codes from all commands. To set or clear /I for part of a makefile, use !CMDSWITCHES. To ignore exit codes for part of a makefile, use a dash (–) command modifier or .IGNORE. Overrides /K if both are specified. 
    /K Continues building unrelated dependencies, if a command returns an error. Also issues a warning and returns an exit code of 1. By default, NMAKE halts if any command returns a nonzero exit code. Warnings from /K are suppressed by /C; /I overrides /K if both are specified. 
    /N Displays but does not execute commands; preprocessing commands are executed. Does not display commands in recursive NMAKE calls. Useful for debugging makefiles and checking timestamps. To set or clear /N for part of a makefile, use !CMDSWITCHES. 
    /NOLOGO Suppresses the NMAKE copyright message. 
    /P Displays information (macro definitions, inference rules, targets, .SUFFIXES list) to standard output, and then runs the build. If no makefile or command-line target exists, it displays information only. Use with /D to debug a makefile. 
    /Q Checks timestamps of targets; does not run the build. Returns a zero exit code if all targets are up-to-date and a nonzero exit code if any target is not. Preprocessing commands are executed. Useful when running NMAKE from a batch file. 
    /R Clears the .SUFFIXES list and ignores inference rules and macros that are defined in the Tools.ini file or that are predefined. 
    /S Suppresses display of executed commands. To suppress display in part of a makefile, use the @ command modifier or .SILENT. To set or clear /S for part of a makefile, use !CMDSWITCHES. 
    /T Updates timestamps of command-line targets (or first makefile target) and executes preprocessing commands but does not run the build. 
    /U Must be used in conjunction with /N. Dumps inline NMAKE files so that the /N output can be used as a batch file. 
    /X filename Sends NMAKE error output to filename instead of standard error. Spaces or tabs can precede filename. To send error output to standard output, specify a dash (–) for filename. Does not affect output from commands to standard error. 
    /Y Disables batch-mode inference rules. When this option is selected, all batch-mode inference rules are treated as regular inference rules. 
      

  3.   

    不能在WINDOWS下编译。那是LINUX的格式。把整个程序考到LINUX下,然后在此目录下,运行make就行了。
      

  4.   

    现在WIN上面搞的没有几个记得NMAKE的指令了
      

  5.   

    nmake就可以了阿~
    那是SDK用的~不是VC~
      

  6.   

    有的mak文件就是vc生成的,你可以在VC中打开该mak文件,会自动生成dsp和dsw文件。如果不是vc生成的,那么就只能用nmake在命令行进行编译。具体方法上面的几位大侠已经说了。