[HOpenGL] ghc-6.2/opengl
Sven Panne
Sven.Panne at aedion.de
Wed Jan 21 09:56:27 EST 2004
mai99dnn at 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.
More information about the HOpenGL
mailing list