Using Makefile (a)----deployment under Windows

Source: Internet
Author: User

makefile is widely used in systems outside of windows, most programmers rely on the VS IDE, and mastering the use of makefile is useful for automated builds

vs uses nmake.exe as a built tool, unlike Linux's make

Nmake.exe in the VS installation directory,

The default directory for VS2005 is: C:\Program Files\Microsoft Visual Studio 8\VC\bin or C:\Program Files\Microsoft Visual Studio 8\sdk\ V2.0\bin (Typically, the file is the same under both directories)
The default directory for vs2003 is: C:\Program Files\Microsoft Visual Studio. NET 2003\vc7\bin or C:\Program Files\Microsoft Visual Studio. NET 2003\sdk\v1.1\bin

to open the DOS window and enter NMAKE, you may receive the following error message:


this is because during the installation of VS, there is no environment variable to register VS, and you can see if you have registered the environment variables for VS in the following ways:

enter set path in the DOS window and you will see the following prompt:


I have registered the environment variable, and if you don't see it, you can add the bin directory of VS to the path of the system environment directory .


Reopen the DOS window, enter NMAKE, and if prompted below, indicate that the environment directory was registered successfully:


at this point, we can start our compilation, open the DOS window, navigate to the source code directory, execute NMAKE,Note that the compilation for NMAKE corresponds to makefile (no suffix)

If you have several VS versions in your system, it is recommended that you do not add environment variables to the path, as I do:
1. Create a new directory utils under \ C and add the directory to the environment variable of path
2, copy the Vcvars32.bat of Vcvars32.bat and vs2003 under the bin directory of vs2005 to C:\Utils directory, rename Vc8.bat and Vc7.bat
3, execute Vc7.bat (using vs2003 Compilation) or Vc8.bat (compile with vS2005) before executing NMAKE

Using Makefile (a)----deployment under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.