Hi,

I suggest, in lib/openGl.l, to replace

(default
   *GluLib "libGLU.so"
   *GlutLib "libglut.so" )

with

(if (= *OS "Darwin")
    (default
        *GluLib "Frameworks/OpenGL.framework/OpenGL"
        *GlutLib "Frameworks/GLUT.framework/GLUT" )
    (default
        *GluLib "/usr/lib/libGLU.so"
        *GlutLib "/usr/lib/libglut.so" ) )

It works like a dream on my iMac! Exactly why I can leave out "/System/Library/" as Jorge suggested, I'm not sure, but it works.
This was good news. ;-)

I'm looking forward to an article about emu64, on picolisp.com ...

/Jon


On 11/6/12 10:21 PM, Jorge Acereda wrote:
On Nov 6, 2012, at 9:34 PM, Alexander Burger wrote:

Hi Jorge,

+   ...
+              "/System/Library/Frameworks/OpenGL.framework/OpenGL"
+   ...
+               "/System/Library/Frameworks/GLUT.framework/GLUT"
+   ...

Shouldn't it just provide sane defaults for the platform in question?
There is no libGLU.so on OS X...
Hmm, I'm not sure I understand that. Are the above not libraries?
Sort of. Those are frameworks, frameworks encapsulate headers/shared libraries 
(bundles) and resources.


  (setq
     *GluLib  "/System/Library/Frameworks/OpenGL.framework/OpenGL"
     *GlutLib "/System/Library/Frameworks/GLUT.framework/GLUT" )

  (load "@lib/openGl.l")

In that way, the 'default' in the library won't override it.
But that seems contrary to the DRY motto. All applications will need
to do that in order to run on OS X.
Well, it could be encapsulated in a commont source file or even
command line argument.


I just feel uneasy to hard-code special library locations. Shouldn't
that be provided by the system environment, like load-library paths?
Ok, in that case just remove /System/Library/ from the paths. I tested and it 
works OK.


That's why I removed "/usr/lib/" from the two variables.

Cheers,
- Alex


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to