You are not logged in.
Pages: 1
I wrote this simple test.
#include <SDL.h>
int main( int argc, char **argv ) {
return 0;
}
And when compiling it with
gcc -g -Wall -I/usr/include/SDL -o sdl-test.c -lSDL
I get:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
Anyone have any idea what I've done wrong or am missing?
Last edited by scragar (2009-07-14 18:43:29)
Offline
you forgot to specify the output name, i missed it too upon first glance
gcc -g -Wall -I/usr/include/SDL -o sdl-test sdl-test.c -lSDL
Offline
Well, I feel stupid now.
Thanks so much for that, from the error I was thinking I'd screwed up a library or something, would never have tried changing the line I used to compile it.
Offline
Pages: 1