Ld returned 1 exit status

Hi. I am trying to compile an OpenGL app. and eventhough the program is finding the gl.h, glu.h, and glut.h files I am still getting error messages for every OpenGL function that my program calls saying that there’s no reference to them. Then the error message finishes w/ ‘ld returned 1 exit status’
Can someone please help. Thanx

That’s because you’re not linking to the GL libraries

Add “-lGL -lGLU” to your commandline or Makefile to fix it

Here’s an example of what you should have for a minimal GL program:

“gcc -Wall -pedantic -ansi yourfile.c -o executablename -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm”

[This message has been edited by richardve (edited 05-02-2001).]

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