Miscellaneous > Programming & Networking

gcc Basics

(1/2) > >>

sAvAgE:
ok I am stuck with gcc version 3 I understand how to put in the arguments for compiling however this is what I am doing.
for openGL glut I am doing this to test the code I am writing

for example
linux@user$ gcc -lGL -lglut main.c
linux@user$ ./a.out

then the proggy runs .. what is the command to actually compile the main.c as a program and not use the input output link as an app?

flap:
Sorry; I don't understand the question. The command to compile main.c as a program is exactly what you've done.

voidmain:
"a.out" *is* a program.  I don't understand the question either.  You can either rename "a.out" to something else, or use the "-o" parameter to gcc to have it automatically compiled/linked to a name other than "a.out".

sAvAgE:
so what you are telling me is all I would have to do is rename the a.out file?
user@linux$ mv a.out program ?

sAvAgE:
thanks void yes you guys were right the a.out is a program . I guess the main question is how do I get gcc to create a makefile installation of the program using glut?

I hope this question resolves my original question

Navigation

[0] Message Index

[#] Next page

Go to full version