[R] update (Re: loading compiled C++ code as shared library)
Faheem Mitha
faheem at email.unc.edu
Thu Jul 25 00:09:16 CEST 2002
On Wed, 24 Jul 2002, Faheem Mitha wrote:
>
> Dear People,
>
> Over the last few days I've been writing C++ to compile as a shared
> library (previously I have always used C). Not entirely to my surprise, I
> am getting errors. Specifically, when I try to load the shared library, I
> get
>
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library
> "/home/faheem/research/thesis/sim/ms/ms.so":
> /home/faheem/research/thesis/sim/ms/ms.so: undefined symbol:
> __gxx_personality_v0
This appears to have something to do with my compile options (see below).
Just doing "R CMD SHLIB ms.cc -o ms.so" does not give the error. Anyone
have any idea what might be causing this?
> Note of course I'm compiling with a C++ compiler (g++)
>
> MAKEFLAGS='CXX=\ g++-3.1 PKG_CXXFLAGS=\ -Wall\ -pedantic\ -Werror\
> -Wshadow ' R CMD SHLIB ms.cc -o ms.so
Sincerely, Faheem Mitha.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list