Compile and link 2019/9/3 C program

C program compile and link:
Pretreatment:
1, replacing all the macro definition #define
2, the processing conditional compilation directives like #if #lese #endif
3, the header file is inserted into the expanded position precompiled specified, # include ""
 
Compiler: a .cpp files generated .obj files
Note: .h file does not participate in the compilation, content .h be included in the text at the time of the pre-treatment
 
compilation:
 
link:
 
Common mistakes:
1, repeated definition of global variables
2, header files contain repeating, will be reported error
3, C runtime library and MFC libraries conflict
4, unresolved external symbol: as a function declaration, but did not achieve the performance function
5, uses a library function, but there is no corresponding library added in the project

Guess you like

Origin www.cnblogs.com/epll/p/11450655.html