How can I compile my C source files without needing to put a main function within them?
main
I get an error for the .cfiles that have no main function and don't want to have to add the main function just for compilation.
.c
On GCC, the -c switch is what you want.
-c
-c means "compile, don't link", and you get a name.o output file.
name.o
1.4m articles
1.4m replys
5 comments
56.9k users