[HOpenGL] Re: Fwd: OpenGLRaw

Andy Gill andygill at ku.edu
Mon Aug 17 19:41:39 EDT 2009


Hi Sven,

After comparing the 'ghc-pkg describe' for GLUT 2.2.0.0 and GLUT  
2.2.1.0,  on my OSX 10.5, this works for me:

   if os(windows) && flag(UseNativeWindowsLibraries)
      cpp-options: "-DCALLCONV=stdcall"
      extra-libraries: glut32
      cc-options: "-DUSE_GETPROCADDRESS"
   else
      cpp-options: "-DCALLCONV=ccall"
      cc-options: "-DUSE_DLSYM"
      if os(darwin)
         frameworks: GLUT
      else
         extra-libraries: glut

So a) + b). Other combinations (i've just tried them) do not work.  
Also, USE_NSADDRESSOFSYMBOL seems deprecated (ld gives link warnings),  
but -USE_DLSYM works, so I've also changed this.

Please let me know how this works out.

Andy

On Aug 16, 2009, at 10:25 AM, Sven Panne wrote:

> Am Montag, 10. August 2009 20:03:53 schrieb Sven Panne:
>> Am Montag, 10. August 2009 19:55:24 schrieb Sven Panne:
>>> [...]
>>> Is this generally the case for Mac OS X users? If yes, the
>>> extra-libraries line should be excluded in the Cabal file for this
>>> platform. Have others experienced the same problem? Reports would be
>>> nice, regardless if things work or not...
>>
>> Just another idea from a different email: Perhaps "-framework  
>> OpenGL" is
>> missing for Mac OS X? It would be nice to hear what the right fix  
>> is, I
>> don't have access to any Macs...
>
> Hmmm, no replies yet... So I'd like to The OpenGLRaw.cabal obviously  
> needs
> some tweaks on Mac OS X, but it is not clear for me what to do. Should
>
>  a) the "extra-libraries: GL" line be removed for the "os(darwin)"  
> case?
>
>  b) a "frameworks: OpenGL" line be added?
>
> What is the right way to fix things? a) alone? b) alone? Or both a)  
> and b)?
> Feedback would be highly appreciated, because I don't have access to  
> Macs.
>
> Cheers,
>  S.
>
>
>

Andy Gill, <andygill at ku.edu>
Assistant Professor
The University of Kansas, EECS Department
Information and Telecommunication Technology Center




More information about the HOpenGL mailing list