Skip to content
Prev 1520 / 15075 Next

rgl on OSX

Dear Sir,

I would like make some 3D graphics with RGL.

Did you know how i can fix this related problem.

Your post tmessage:

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.