Re: gcc compiling problem



Yinghui Zhang <y.zhang@xxxxxxxxxxxxxx> wrote:
....
Many thanks, Mike. It works! Brilliant! However, I got some other
problems:
------------------
/usr/ccs/bin/ld: Unsatisfied symbols:
glutInitWindowSize(code)
glutInitDisplayMode(code)
glutMainLoop(code)
glutCreateWindow(code)
glutInitWindowPosition(code)
glutInit(code)
collect2:ld returned 1 exit status
gmake: ***[glutw] Error 1
--------------------

So what's the problem? Many thanks in advance.

It sounds like you just didn't link with libglut or linked with
it before the code that used it. It is available on HP-UX as
/opt/graphics/OpenGL/contrib/libglut/libglut.a which you can
use with -L/opt/graphics/OpenGL/contrib/libglut -lglut .
Because it is an archive library it must appear in the link line
after the file that calls the glut functions. If it is listed too
early then the linker won't know to pull in the required functions.

The version of glut shipped with HP-UX is quite old. If you have
code that uses newer glut features you will need to compile a newer
version. You can find that at
http://www.opengl.org/resources/libraries/glut/glut_downloads.php
.



Relevant Pages

  • Re: gcc compiling problem
    ... I got my glut window! ... Yinghui Zhang ... after the file that calls the glut functions. ... The version of glut shipped with HP-UX is quite old. ...
    (comp.sys.hp.hpux)
  • Re: GLUT vs Windows
    ... one most call the C function Exit(). ... GLUT is a rather old library, and has not been updated for 6-8 years. ... Rendering to a DIB is software-only and dead slow. ...
    (comp.graphics.api.opengl)
  • Re: GLUT vs Windows
    ... There's a new version called freeglut that implements the same functions as glut, and has more stuff in it. ... One of them is to exit without quitting. ...
    (comp.graphics.api.opengl)