【发布时间】:2019-10-24 16:05:20
【问题描述】:
当我们想一起编译一个多文件时。
为什么我们需要在 makefile 中将 .c 文件转换为 .o 而不仅仅是 gcc file1.c file2.c -o newfile
例如
\\ in make file
file: file1.c file2.c
gcc file1.c file2.c -o combination
\\ we can just call make in the terminal
\\ i have watch video on youtube, why people using file1.o file2.o. why we need to convert .c file to .o instead of just gcc the file and ./ execute it?
【问题讨论】:
标签: c gcc makefile compiler-errors