Today, the IDE has fly all over, and the function is getting stronger. For programmers, this is indeed a good thing, and it is self-evident to improve work efficiency. But for beginners, it is not a good thing to use IDE directly because Ide has done a lot of things for you, but you don't know. One sentence of the attraction: "Do not build a high platform". Let's take a look at how to compile and link in the command line. You know, this is one of the main features of IDE.
Under the Windows platform, the compilation of the command line is mainly NMAKE, and there is a detailed description of NMAKE, MSDN is a detailed description, but this article is for NMAKE beginners, not so complicated.
First, use nmake, you must write a Makefile file for your program to describe if you compile and link your program. A common Makefile file is as follows:
Include
All = hello.exe
Objs = hello.obj draw.obj
. C.Obj: $ (CC) $ (CFLAGS) $ (CVARS) $ *. c
Hello.exe: $ (LINK) $ (Guiflags) -out: Hello.exe $ (Guilibs) $ (OBJS)
Clean: Del * .obj
First line! Include
Here we focus on the macro definition introduced by Win32.mak. (to be continued)