I have been trying to complile a simple code to initialise and create a window. I know the code as no bugs since a copied it from a tutorial. I also checked that I was referencing to the correct library. When I use cc to compile my program it gives me a bunch of errors in gl.h. But when I use gcc, the compliler finds the GL library but doesn’t find glFlush, glClear or any other GL function. Here is what I use to compile and the result that I get.
The result is:
collect2: ld returned 1 exit status
/usr/ccs/bin/ld: Unsatisfied symbols:
glFlush (code)
glShadeModel (code)
glClear (code)
glClearColor (code)
I am not an expert though. But i think you will have to interchange the order of the flags you used. Try using the following order:
-lglut -lGLU -lGL -lXhp11 -lXext -lXmu -lX11 -lm
instead of the order you used in ur makefile. Hope that helps!!
vijay.
Originally posted by muya:
[b]I have been trying to complile a simple code to initialise and create a window. I know the code as no bugs since a copied it from a tutorial. I also checked that I was referencing to the correct library. When I use cc to compile my program it gives me a bunch of errors in gl.h. But when I use gcc, the compliler finds the GL library but doesn’t find glFlush, glClear or any other GL function. Here is what I use to compile and the result that I get.
The result is:
collect2: ld returned 1 exit status
/usr/ccs/bin/ld: Unsatisfied symbols:
glFlush (code)
glShadeModel (code)
glClear (code)
glClearColor (code)[/b]