我看<Win32多线程程序设计>里的示例项目都只有3个文件: cpp,mak和mdp格式的,
这种用VC怎么打开编译啊?是不是要用命令行?具体怎么弄?请高人指教!
谢谢!!!

解决方案 »

  1.   

    Using nmake.exe under  \Microsoft Visual Studio\VC98\Bin
    to compile the project.In fact ,if you ever program a linux program,you will quite farmiliar with 
    the Makefile.
      

  2.   

    Using
      nmake /?
    to see more detail!Or You could refer to the MSDN
      

  3.   

    *.mdp是老版本VC的工程文件,类似于现在的*.dsw,*.dsp*.mak是命令行编译文件。
      

  4.   

    在新版本的VC中打开*.mdp文件,会提示你是否转换成新的格式,回答是就行了。
    这个问题在 DirectX编程时非常普遍,MSDN里面的工程文件都是这样的。在新版本VC中,你可以把现在的*.dsp输出为*.mak,点击"Project"-->"Export makefile(s)"即可。nmake命令的用法如下: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.