[Rcpp-devel] dyn.load error with particular functor

2014-10-22 Thread nate russell
Hello, I am running into the "Error in dyn.load [...] unable to load shared object ['/tmp/...'] undefined symbol [_...]" error; however it is only happening with one particular Rcpp function, which I find puzzling. Here is my .cpp file containing two functions - I can compile the first one without

Re: [Rcpp-devel] dyn.load error with particular functor

2014-10-22 Thread nate russell
in the function where you actually use it instead of > making it a member. > int operator() (std::string x1, std::string x2) { > static int tracker; > tracker++; > return ((s1==x1 && s2==x2) ? (tracker-1) : -1); > } > > > > On Wed, Oct

Re: [Rcpp-devel] dyn.load error with particular functor

2014-10-22 Thread nate russell
c2); std::transform(vc1.begin(),vc1.end(),vc2.begin(),vcount.begin(),track); vcount.erase( std::remove_if(vcount.begin(),vcount.end(), [](int i) -> bool { return (i<0); }), vcount.end()); track.reset(); return vcount; } On Wed, Oct 22, 2014 at 2:29 PM, n

Re: [Rcpp-devel] dyn.load error with particular functor

2014-10-22 Thread nate russell
ing: > http://stackoverflow.com/questions/185844/initializing-private-static-members > > Matt > > > On Wed, Oct 22, 2014 at 2:03 PM, nate russell > wrote: > >> Just for the sake of completeness, I noticed that the value of >> trackIdx::tracker was persisting (an