Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22157

Makefile -o, why need .o

$
0
0

when we want to compile a multi file together.

Why we need to convert .c file to .o in the makefile instead of just gcc file1.c file2.c -o newfile

For example

\\ 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?

Viewing all articles
Browse latest Browse all 22157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>