linking problem

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 ?

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

thanks FermatSpiral

before:
glutInitiWindowPosition
-
glutInitWindowsSize
-
glutDisplayFunct
-
glutKeyboardFunct
-
now:
glutInitWindowPosition
glutInitWindowSize
glutDisplayFunc
glutKeyboardFunc

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.