Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cyn0n

linker isn't recognizing gl.h functions

This topic is 5727 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

greets- I''ve tried compiling all of the http://nehe.gamedev.net tuts that have sdl and/or glx support and I always get linker errors that start out like: /tmp/ccCXeskK.o: In function `resizGLScene'': /tmp/ccCXeskK.o(.text+0x20): undefined reference to `glViewport'' I''m running Debian Linux with a 2.4.19 kernel and the latest drivers (glx and kernel module) from nvidia. I''m pretty sure I have all the packages I need. Why isn''t this compiling? My gl sources are in the right place. /usr/include/GL/* -cyn0n

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by cyn0n
/tmp/ccCXeskK.o: In function `resizGLScene'':
/tmp/ccCXeskK.o(.text+0x20): undefined reference to `glViewport''

gcc <sourcefiles> -I <include paths> -L <library paths> -lgl -lglu etc 

Share this post


Link to post
Share on other sites
greets-
I added -I/usr/include/GL to my makefile and it didn''t help. This is what it looks like now:

CC = gcc -Wall -pedantic -ansi

all:
$(CC) lesson05.c -o lesson05 -I/usr/include/GL -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm

clean:
@echo Cleaning up...
@rm lesson05
@echo Done.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!