Skip to main content
gamedev.net
🔒 Locked

compiling with GCC?

Started by Psycho1 Dec 5, 2001 at 10:22 PM 6 replies 300+ views
Original Post
Psycho1
Psycho1
How would i compile something using GCC? =/ (gimme the string code, plz)
C-Junkie
C-Junkie
gcc file.c -o file
Psycho1
Psycho1
i know that
i mean with opengl
i need to know how to link the libs and the compiler options in the string, tahts what i want a string of.
Null and Void
Null and Void
C-Junkie is completely correct, but since this is NeHe''s forum, I''m guessing you want some OpenGL stuff in there too .

Linking with GL libraries:
gcc file.c -o file -lGL -lGLU

Manually adding GL header directory to search path (the path may be different for you):
gcc file.c -o file -lGL -lGLU -I/usr/X11/include

Add "-Wall" for warnings and "-O2" (or 1 or 3, higher is better) for optimizations.

[Resist Windows XP''s Invasive Production Activation Technology!]
Psycho1
Psycho1
ugh, i stil get undefined refrances
X_X

heres what i got for this....
gcc -Walls -g lesson1.c -o test -lGL -lGLU -I/usr/X11/include

it gives me GULT errors. should i have a -lGULT or somethan as well?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.