View Full Version : ld returned 1 exit status
05-01-2001, 10:05 PM
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
05-01-2001, 10:29 PM
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).]
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.