[Rd] undefined symbol: Rf_rownamesgets

Ross Boylan ross at biostat.ucsf.edu
Wed Apr 18 04:43:27 CEST 2007


I get the error
 undefined symbol: Rf_rownamesgets
when I try to load my package, which include C++ code that calls that
function.  This is particularly strange since the code also calls
Rf_classgets, and it loaded OK with just that.

Can anyone tell me what's going on?  

For the record, I worked around this with the general purpose
attribute setting commands and R_RowNamesSymbol.  I discovered that
even with that I wasn't constructing a valid data.frame, and fell back
to returning a list of results.

I notice Rinternals.h defines
LibExtern SEXP	R_RowNamesSymbol;   /* "row.names" */
twice in the same block of code.

I'm using R 2.4.1 on Debian. The symbol seems to be there:
$ nm -D /usr/lib/R/lib/libR.so | grep classgets
00032e70 T Rf_classgets
$ nm -D /usr/lib/R/lib/libR.so | grep namesgets
00031370 T Rf_dimnamesgets
00034500 T Rf_namesgets

The source includes
#define R_NO_REMAP 1
#include <R.h>
#include <Rinternals.h>
and later
#include <memory>  // I think this is why I needed R_NO_REMAP

I realize this is not a complete example, but I'm hoping this will
ring a bell with someone.  I encountered this while running
R CMD check.  The link line generated was
g++ -shared  -o mspath.so AbstractTimeStepsGenerator.o Coefficients.o CompositeHistoryComputer.o CompressedTimeStepsGenerator.o Covariates.o Data.o Environment.o Evaluator.o FixedTimeStepsGenerator.o LinearProduct.o Manager.o Model.o ModelBuilder.o Path.o PathGenerator.o PrimitiveHistoryComputer.o SimpleRecorder.o Specification.o StateTimeClassifier.o SuccessorGenerator.o TimePoint.o TimeStepsGenerator.o mspath.o mspathR.o   -L/usr/lib/R/lib -lR

Thanks.
Ross



More information about the R-devel mailing list