
Hi there... The following problem was posted to the haskell-users list: We can not build a opengl application with hopengl. We get this error message: Linking ... Undefined first referenced symbol in file glXGetProcAddressARB /usr/local/share/ghc/lib/ghc-6.2/libHSOpenGL_cbits.a(HsOpenGL.o) glXGetProcAddressARB is a function that returns just a pointer to another function. It is used to find out what special gl features your graphiccard or mesa provides. If there isn't that feature you want, this function returns a NULL pointer. I hope I'm right so far. Our system is a "SunOS 5.8 Generic_108528-27 sun4u sparc SUNW,Ultra-60". I looked around, but I was unable to find any libglX, where this function normally appears. One way to make this all running is to write a foo-bar-glXGetProcAddressARB function that returns everytime the NULL-pointer. But how can I compile this together with the haskell source? Or must I build a *.so library? Or is there a much much easier way to solve this? Cheers Patrick -------------------------------- RockMe http://www.yoursort.de Anikas Pharmaziestudium-Seite http://www.pharmazie.net.ms

mai99dnn@studserv.uni-leipzig.de wrote:
The following problem was posted to the haskell-users list:
This HOpenGL list is probably the right one for questions like this...
We can not build a opengl application with hopengl. We get this error message:
Linking ... Undefined first referenced symbol in file glXGetProcAddressARB /usr/local/share/ghc/lib/ghc-6.2/libHSOpenGL_cbits.a(HsOpenGL.o)
Hmmm, this looks like a configure problem. Could you please send a log of the shell session and the generated config.log and config.status?
glXGetProcAddressARB is a function that returns just a pointer to another function. It is used to find out what special gl features your graphiccard or mesa provides. If there isn't that feature you want, this function returns a NULL pointer. I hope I'm right so far.
Yep.
Our system is a "SunOS 5.8 Generic_108528-27 sun4u sparc SUNW,Ultra-60". I looked around, but I was unable to find any libglX, where this function normally appears.
What OpenGL implementation are you using? Mesa or SUN's own? I've never tried the latter due to the lack of privileges to install it, but I would be very interested in getting things up and running with it.
One way to make this all running is to write a foo-bar-glXGetProcAddressARB function that returns everytime the NULL-pointer.
Yes, but you will probably lose some available functionality then.
But how can I compile this together with the haskell source? Or must I build a *.so library? Or is there a much much easier way to solve this?
A quick workaround would be generating an object file containing just the dummy glXGetProcAddressARB and add this to the linking step via editing GHC's (or your own local) package.conf file. If you've installed GHC yourself, adding some #ifdefs to fptools/libraries/OpenGL/cbits/HsOpenGL.c and rebuild GHC, which should be quite fast if nothing else has changed. Cheers, S.

mai99dnn@studserv.uni-leipzig.de wrote:
[...] Undefined first referenced symbol in file glXGetProcAddressARB /usr/local/share/ghc/lib/ghc-6.2/libHSOpenGL_cbits.a(HsOpenGL.o)
Hmmm, it looks like I'll have to update the autoconf magic again: Since GLX 1.4, glXGetProcAddressARB is simply called glXGetProcAddress. Will be fixed in the repository soon... Cheers, S.
participants (2)
-
mai99dnn@studserv.uni-leipzig.de
-
Sven Panne