Get the App
SLTechnology News&Howtos  ›  Development  › 

What are VS2003 makefile's insights and help?

Shulou Source: shulou.com Published: 2022-06-02 03:04:57 10月28日 Update

What is the opinion and help of VS2003 makefile? I believe that many inexperienced people are at a loss about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

The following is a "HelloWorld!" for beginners. The level of makefile cannot deny the complexity and power of the advanced features of VS2003makefile.

The makefile that I can understand so far is just a batch program. (like the shell file under Linux) the key processing step of makefile is to call the compiler to perform the compilation, while under windows it is cl,Linux +. The make program under Windows is make under nmake.exe,Linux. To perform compilation, under windows, under cl,Linux, it is glossy +. The make program under Windows is make under nmake.exe,Linux.

Let's write a simple C program first:

# include int main () {printf ("hello world!\ n"); getchar (); return 1;}

Save this program as test.cpp.

Perform compilation under WINDOWS (execute c:\ programe files\ vs2003\ Vc7\ bin\ vcvars32.bat first): cl test.cpp

Perform compilation under Linux: Gmail + test.cpp

It's very simple! Then write the makefile file:

Anyname: cl test.cpp # under linux, the previous line is written as cl + test.cpp # Note the line cl: the indentation in front of it is a tab key, and it must be tab. The anyname of the line can be any name, but with a colon.

Compile using NMAKE under WINDOWS (execute c:\ programe files\ vs2003\ Vc7\ bin\ vcvars32.bat first): nmake.exe

Compile with MAKE under Linux: VS2003makefile

Oh, it's easy, isn't it? In fact, most of the VS2003makefile is the definition of variables, and eventually the values of these variables are used as parameters of cl or gathers +.

After reading the above, have you mastered the insight and help of VS2003 makefile? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Compile program opinion help one line content variable that is file method more problem complex powerful advanced helpless for this compiler key colon Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Information vpn OPPO Reno MySQL