Anyone know the library(ies) and/or object file(s) which gcc tells ld to link in before generating a simple C program?
I am using gcc under the Dev-C++ environment on Windows, so it might be specific to that.
I know you can just use the -o switch and go the whole way of compiling a simple C file and creating the executable all in one step, but I want to use the -c switch, make an object file, and then use ld to link that object file with (the things I am asking for now) to make an executable that way.
I have tried crt1.o and crt2.o as those seemed like prime candidates, but they didn't help. I'm pretty sure it is one of the lib<nameoflib>.a files but I don't see any which seem right.
BTW, I'm not even trying to use any functions (other than main). I just want to get this to work first.
basically
int main(void){
return 0;
}
gcc -c test.c
ld test.o -l<stuff that I need now>
test