C language compiler multiple files

There are multiple C language file needs to be compiled together to achieve the following for the gcc

// name is not specified exe generation, a.exe file generated by default 
gcc file.h file1.c file2.c   

// specify the name of the generated exe file, here filename.exe 
gcc file.h file1.c file2.c -o filename

 

Guess you like

Origin www.cnblogs.com/xiangsui/p/11622285.html