[Rcpp-devel] Trouble linking with Rcpp

Jonathon Love jon at thon.cc
Tue Jul 8 11:54:00 CEST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

I'm just trying to get my head around linking with Rcpp, because I
often have difficulties with this step. I'm developing an application
that embeds R using RInside and Rcpp (shout out to dirk for making these!)

I have an R install which I can link my application against, and that
all works fine, but whenever I try and use a new R installation,
linking against Rcpp always fails. (I guess I fluked it the first time)

For example, using Rcpp 0.10.6, R-3.0.3 on OS X mavericks, I get the
error message below. This isn't because it can't find the
libRcpp.dylib, if i remove it from library path, i get a whole lot
more undefined symbol complaints.

Is this indicative of libRcpp.dylib and my application being built
with different compilers? and them formatting their symbol tables
slightly differently? But to my knowledge, i only have the latest
clang installed.

I thought that perhaps it had to do with link flags, but on my
machine, Rcpp::RcppLdFlags() always returns an empty string.

If anyone could help me understand what's going on, I would appreciate
that.

with thanks

Jonathon




Undefined symbols for architecture x86_64:
  "demangle(std::string const&)", referenced from:
      std::string
Rcpp::get_return_type_dispatch<Rcpp::DataFrame>(Rcpp::traits::integral_constant<bool,
false>) in rcppbridge.o
  "Rcpp::Environment::operator[](std::string const&)", referenced from:
      Rcpp::InternalFunction::set(SEXPREC*) in rcppbridge.o
  "Rcpp::Environment::get(std::string const&) const", referenced from:
      Rcpp::Environment::Binding::operator
Rcpp::Function<Rcpp::Function>() const in rcppbridge.o
  "Rcpp::Environment::assign(std::string const&, SEXPREC*) const",
referenced from:
      bool Rcpp::Environment::assign<std::string>(std::string const&,
std::string const&) const in rcppbridge.o
      bool Rcpp::Environment::assign<Rcpp::Vector<19> >(std::string
const&, Rcpp::Vector<19> const&) const in rcppbridge.o
      bool
Rcpp::Environment::assign<Rcpp::InternalFunction>(std::string const&,
Rcpp::InternalFunction const&) const in rcppbridge.o
  "Rcpp::RObject::attr(std::string const&) const", referenced from:
      RcppBridge::readDataSet(std::map<std::string,
Column::ColumnType, std::less<std::string>,
std::allocator<std::pair<std::string const, Column::ColumnType> > >
const&) in rcppbridge.o
      RcppBridge::makeFactor(Rcpp::Vector<13>&, Labels const&, bool)
in rcppbridge.o
      RcppBridge::makeFactor(Rcpp::Vector<13>&,
std::vector<std::string, std::allocator<std::string> > const&, bool)
in rcppbridge.o
      RcppBridge::readDataSetHeader(std::map<std::string,
Column::ColumnType, std::less<std::string>,
std::allocator<std::pair<std::string const, Column::ColumnType> > >
const&) in rcppbridge.o
      Rcpp::Vector<16>::push_back__impl(SEXPREC* const&,
Rcpp::traits::integral_constant<bool, true>) in rcppbridge.o
ld: symbol(s) not found for architecture x86_64



- -- 

How happy is he born and taught,
That serveth not another's will;
Whose armour is his honest thought,
And simple truth his utmost skill

This man is freed from servile bands
Of hope to rise, or fear to fall:
Lord of himself, though not of lands,
And, having nothing, yet hath all.

  -- Sir Henry Wotton





-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - https://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJTu7+4AAoJEH277gjmPGDYb+0QALPkRVvmqk+WcWKlTRLzti43
djVInafGyrNjnVsv4Yz29WGE/dRM/MVfU8xf9ovkEEE7i2QQ5S2oHnoYxJH8d7o6
50o/LjFehJ0KoWyXXHr90xEtYaSaxFTgoCJ5WsbruNYKGxktsxiZt+3O798M97ws
92iV9u3hrqMngvTN3Bkqky3S8IFg4fJWALgozFTY/IocjvbRgokT/hM6RfIbFITs
+VneRdXHMzLCEI39wk2bZtbXcttZquuShkTSj3Y3+z5tNOMuvd8NnaHBppaLjDsV
rVZXWYPeNZuJY9TnW94OojrXlRlyanKOMVYG2G0cvNLC7PjA6NCb8qu0oBUU/YN6
DaXqNBrawHGM7OjF8gOiYaaMleZO04WGY8ByngyOx8iOlZ/NEdWI+ZlEqRVnlU16
Ou7Ioo4jbau3YbZi/jpqiaPFdnlYvqCeO+ykvae858NDASqx3pcWBkbfFOapo5v8
KJk5jGtD9WzxfEQ7fcIppHPcMXnqD3/NogdwDIecXo8I9ZTUG9LHpKJJchBkhBbM
02eYjQbqJmr+3WWDxpIQkLegnYn6RzkVvTXALcrodVlfotubURZJv0J5C9tgnsfT
cCGtSnZgZO6R8KeNrqAShbYBqSPYd+nohCxNc4gbcaZy7ZI6cfcFSa7WVTOBLYUA
JWf2mub/jtyAdG9/2fja
=qWw7
-----END PGP SIGNATURE-----


More information about the Rcpp-devel mailing list