Linking issues [ was: Re: Re: ANNOUNCE: HOpenGL 1.05 released]

Sven Panne <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Glynn Clements wrote:
> [...] You should be able to work around the problem by adding -lXxf86vm to
> the link command, but it has to come *after* the -lfreeglut-1.3
> switch.

Glad to hear this. :-) Some people on this mailing list had linking troubles,
especially with GHCi and GLUT/GLU/GL. AFAIK there are basically two kinds of
platforms: Ones where the relative order of libraries on the linker commandline
does not matter and ones where you have to mention a library B used by a library
A after it, i.e. in the order "-lA -lB". Solaris falls in this category, see e.g.
my patches submitted to the Mesa project:

    http://sourceforge.net/tracker/index.php?func=detail&aid=544638&group_id=3&atid=300003
    http://cvs.sourceforge.net/viewcvs.py/mesa3d/Mesa/demos/Makefile.am?r1=1.29&r2=1.30

If the GLUT package doesn't work with GHCi on some platforms, the exact circumstances
would be interesting. On x86 Linux the order "-lglut -lGLU -lGL <some X11 libs>" works
perfectly. Perhaps there are some dlopen() incompatibilities between different platforms.
Any experts in this area on this list?

Cheers,
    S.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.