PDA

View Full Version : linking problem



logic_one
08-04-2002, 03:30 AM
installed mesa , demos work fine

when compiling get link faults
gcc ogl1.o -o ogl1 -L/usr/X11R6/lib -lGL -lGLU -lglut -lX11 -lXmu -lXi -lXext -lm

ogl1.o: In function `main':
ogl1.o(.text+0x34): undefined reference to `glutInitiWindowPosition'
ogl1.o(.text+0x49): undefined reference to `glutInitWindowsSize'
ogl1.o(.text+0xaa): undefined reference to `glutDisplayFunct'
ogl1.o(.text+0xba): undefined reference to `glutKeyboardFunct'
collect2: ld returned 1 exit status
make: *** [ogl1] Error 1


what is wrong ?

http://www.opengl.org/discussion_boards/ubb/confused.gif

FermatSpiral
08-04-2002, 10:22 AM
All these functions have an spelling mistake. So they aren't on -lglut. If you created the prototypes for these, you'll need to make the actual functions too. Or just correct the spelling http://www.opengl.org/discussion_boards/ubb/smile.gif

logic_one
08-10-2002, 10:08 AM
thanks FermatSpiral

before:
glutInitiWindowPosition
-
glutInitWindowsSize
-
glutDisplayFunct
-
glutKeyboardFunct
-
now:
glutInitWindowPosition
glutInitWindowSize
glutDisplayFunc
glutKeyboardFunc
http://www.opengl.org/discussion_boards/ubb/smile.gif