Re: R-alpha: dyn.load

Heiner Schwarte (
Sun, 31 Mar 1996 20:55:50 +0100 (NFT)

Date: Sun, 31 Mar 1996 20:55:50 +0100 (NFT)
From: Heiner Schwarte <>
Subject: Re: R-alpha: dyn.load
To: "Alan K.F. Siu" <>
In-Reply-To: <>
Message-Id: <>

R.alpha0.3's dyn.load() does not work properly under Linux. There is 
an immediate fix to this problem: in dotcode.c replace

	sprintf(buf, "_%s", name)           (*)

	sprintf(buf, "%s", name)            (**)

Then dyn.load() should work. Of course the linker requires the -ldl
flag which has to be added to the Makefile. Note that under Linux 
the definitions of .C() and .Fortran() are slightly different. Thus 
functions compiled from C should be called by .C() and functions compiled 
from Fortran by .Fortran().

If the form (*) is necessary for other platforms, (*) should be ifdefed 
appropriately. Both ELF-Linux and AIX with the libdl emulation library 
require the form (**). 

r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: