1745809 Members
4039 Online
108722 Solutions
New Discussion юеВ

OpenGL with glut

 
SOLVED
Go to solution
LAJOIE
Occasional Contributor

OpenGL with glut

hello,
i have done a prog in openGL with glu and glut on solaris. I want to compil it on HP-UX.
I have download and compil glut.
I can compil it but i have always this error :
/usr/lib/dld.sl: Unresolved symbol: XShmQueryExtension (code) from /opt/graphics/OpenGL/lib/libHpGL.2
I am beginer, to compil my source i use :
aCC -I/home/myhome/opengl/glut-3.7/include -I/opt/graphics/OpenGL/include -L/home/myhome/opengl/glut-3.7/lib/glut -L/opt/graphics/OpenGL/lib myfile.c -lX11 -lXi -lglut -lGL -lGLU -lm

If you need more information about my system ask me.

Thks
7 REPLIES 7
Mike Stroyan
Honored Contributor

Re: OpenGL with glut

That symbol is defined in libXext.sl.
In general you should link libraries that need symbols before libraries that define those symbols. It is not always necessary when using shared libraries, because a shared library is brought in as one unit. It is still a good habit. I would list -lXext and -lXi before -lX11. Use this library list in your link line-

-lglut -lGL -lGLU -lXext -lXi -lX11 -lm
LAJOIE
Occasional Contributor

Re: OpenGL with glut

I try to change my link order but
I still have this error message :

/usr/lib/dld.sl: Unresolved symbol: XShmQueryExtension (code) from /opt/graphics/OpenGL/lib/libHpGL.2
IOT trap

Is there a problem with GL? Can I find tools to check my config?
I can't change my config because I am not root :(
Mike Stroyan
Honored Contributor

Re: OpenGL with glut

Did you actually add -lXext to the link?

You can run /opt/graphics/OpenGL/demos/verify_install-32 to verify the OpenGL installation. There are also demo programs with source and makefiles under /opt/graphics/OpenGL/demos. You could copy those directories to another directory where you have write permission and build the demos.
LAJOIE
Occasional Contributor

Re: OpenGL with glut

Thanks,
I can compile stereo and occlusion_cull, I will use those examples to compil my prog.

When I check my install I have this error message :

/usr/lib/X11R6/pa20_64/libXhp11.sl is bad or missing

But as I can compile demos it doesn't seem important

Thks for help
LAJOIE
Occasional Contributor

Re: OpenGL with glut

I compile but i have now this error :

/usr/lib/dld.sl: Unresolved symbol: XmuLookupStandardColormap (code) from /home/u181568/citrix/U181568/opengl/glut-3.7/lib/glut/libglut.sl
IOT trap

My problem seems to be in glut
I had to change the makefile to compile glut, I add :
-I/opt/graphics/OpenGL/include
I prefer use the glut-3.7-sd-11.00.depot, but how decompress it without be root?

If it is easier to change my code to no use glut why not!!
I join my source, if someone could explain me how to no use glut.


Thks

Thk
Mike Stroyan
Honored Contributor
Solution

Re: OpenGL with glut

You can find that missing XmuLookupStandardColormap symbol by linking with "-L/usr/contrib/X11R6/lib/ -lXmu".

There is also a really old version of libglut in /opt/graphics/OpenGL/contrib/libglut that includes its own implementations of the Xmu functions that it uses.

cc -o myfile myfile.c -g -I/opt/graphics/OpenGL/include -I/opt/graphics/OpenGL/contrib/libglut -I/opt/graphics/OpenGL/include/GL -L/opt/graphics/OpenGL/lib -L/opt/graphics/OpenGL/contrib/libglut -lGLw -lglut -lGLU -lGL -lXm -lXt -lXext -lX11 -lm
LAJOIE
Occasional Contributor

Re: OpenGL with glut

Youpi!!!!
I have my openGL windows!!!!!!!!!!!!!!!

Thks