stupid question about C and openGL

I am just green hand to OPENGL, but now I got a stupid question about C programming.

I use unix, after I use cc to compile the file, how can get the *.o file run? Or i should use some makefile to creat a runable file?

Please tell me in detail.

hahahahaha
=)

(no. sorry=)

uhm, you can’t run the object files. you need to link them into an executable =)

if you did this:

cc main.c -o myProg

then you’ll get a main.o (ie. main.c compiled) and an executable called myProg. (If you omit the -o <filename> you’ll get an executable a.out).

if you did this, tho’"

cc -c main.c

you’ll compile main.c into main.o, but it won’t link the object file into an executable…

if you want to link all your .o files together, you’d do:

cc main.o

hmm. hope this makes sense

cheers,
John

Thanks a lot