Skip to content

rgl on OSX

1 message · stefano iacus

#
Looking at the .FirstLib code of rgl I saw

.First.lib <- function(lib, pkg)
{
   # For MacOS X we have to remove /usr/X11R6/lib from the  
DYLD_LIBRARY_PATH
   # because it would override Apple's OpenGL framework
    
Sys.putenv("DYLD_LIBRARY_PATH"=sub("/usr/X11R6/ 
lib","",Sys.getenv("DYLD_LIBRARY_PATH")))

   # load shared library

   library.dynam( "rgl", pkg, lib)

   ret <- .C( symbol.C("rgl_init"),
     success=FALSE
   )

   if (!ret$success) {
     dyn.unload( file.path( libpath, "libs", paste( "rgl",  
.Platform$dynlib.ext, sep="") ) )
     stop("error rgl_init")
   }

}

If I suppress the line starting with Sys.putenv ("....
than I get the same error as you.
If I leave as it is, I simply cannot load the library.

stefano
On Marted?, giu 3, 2003, at 00:27 Europe/Rome, Anestis Antoniadis wrote: