Re: [Rcpp-devel] finding an undefined symbol

2010-11-04 Thread Douglas Bates
On Thu, Nov 4, 2010 at 3:40 PM, Andrew Redd wrote: > Figured it out.  The definition for data3 is in a namespace, so it > could not find the member functions. > -Andrew Good. Now on to fame and fortune, I hope. > On Thu, Nov 4, 2010 at 2:26 PM, Andrew Redd wrote: >> Thanks for the post.  The da

Re: [Rcpp-devel] finding an undefined symbol

2010-11-04 Thread Andrew Redd
Figured it out. The definition for data3 is in a namespace, so it could not find the member functions. -Andrew On Thu, Nov 4, 2010 at 2:26 PM, Andrew Redd wrote: > Thanks for the post.  The data3 class is defined with > --- > #include > #include "types.h" //defines ivec, tvec, idxvec, as vector

Re: [Rcpp-devel] finding an undefined symbol

2010-11-04 Thread Andrew Redd
Thanks for the post.  The data3 class is defined with --- #include #include "types.h" //defines ivec, tvec, idxvec, as vectors and numeric as double class data3{ public: data3(); void initPat(tvec, tvec); void initAug(ivec, ivec, tvec); void initSwabs(idxvec, ivec, tvec); void setParameters(numeri

Re: [Rcpp-devel] Error loading modules

2010-11-04 Thread Andrew Redd
Thanks. I figured it was a simple problem. Now I have a working toy package that successfully uses both Rcpp Modules and CUDA :) -Andrew On Thu, Nov 4, 2010 at 1:51 PM, Romain Francois wrote: > Ok. Now it is much more easier to help. > > This works for me: > > > require( anRpackage ) > Le char

Re: [Rcpp-devel] Error loading modules

2010-11-04 Thread Romain Francois
Ok. Now it is much more easier to help. This works for me: > require( anRpackage ) Le chargement a nécessité le package : anRpackage Le chargement a nécessité le package : Rcpp > yada <- Module( "yada", "anRpackage" ) > yada$hello() Erreur dans yada$hello() : boom The key is the second argument

Re: [Rcpp-devel] Error loading modules

2010-11-04 Thread Romain Francois
Hi, How about sharing the code that triggers the error. It is like your car is broken and you call your insurance to fix it, but you don't tell them where you are. Romain Le 04/11/10 20:29, Andrew Redd a écrit : I'm getting what I assume is a basic error, but I'm not sure what I'm doing wro

[Rcpp-devel] Error loading modules

2010-11-04 Thread Andrew Redd
I'm getting what I assume is a basic error, but I'm not sure what I'm doing wrong. Error in Module(module, mustStart = TRUE) : Failed to initialize module pointer: Error in FUN("_rcpp_module_boot_vecadd"[[1L]], ...): no such symbol _rcpp_module_boot_vecadd in package .GlobalEnv is the error whe

Re: [Rcpp-devel] Matrix assignment with inline

2010-11-04 Thread Kaveh Vakili
Thanks for the advice Dirk, > >Kaveh, > >If you are having problems with things like matrix indexing I would recommend >a somewhat more incremental approach: > > pass a matrix from R, find the maximum element and return it > > pass a matrix from R, find the min and maximum elements and

Re: [Rcpp-devel] inline with classes

2010-11-04 Thread Whit Armstrong
Very cool that you guys used my example in your Google Tech Talk. Thanks for the continued hard work on Rcpp! -Whit 2010/10/9 Dirk Eddelbuettel : > > On 8 October 2010 at 23:26, Whit Armstrong wrote: > | Thanks again, Dirk. > | > | full example (sorry for the verbose post): > > Thanks for posti

Re: [Rcpp-devel] Matrix assignment with inline

2010-11-04 Thread Dirk Eddelbuettel
Kaveh, If you are having problems with things like matrix indexing I would recommend a somewhat more incremental approach: pass a matrix from R, find the maximum element and return it pass a matrix from R, find the min and maximum elements and return both multiply two (small) ma

Re: [Rcpp-devel] finding an undefined symbol

2010-11-04 Thread Douglas Bates
On Wed, Nov 3, 2010 at 2:22 PM, Andrew Redd wrote: > I'm writing a rather complicated package using CUDA and Rcpp.  I have > everything compile and link ok, but when loading I get a >> "unable to load shared object ..." >> "... undefined symbol:  _ZN5data39initSwabsESt6vector..." > Does anyone hav

Re: [Rcpp-devel] Matrix assignment with inline

2010-11-04 Thread Romain Francois
Le 03/11/10 12:16, Kaveh Vakili a écrit : Hi list, I'm trying to learn inline by translating snippets of c++ code from the book "Numerical Recipes". in page 44-45, there is a c++ code to perform Gauss-Jordan elimination of a matrix (see below). I understand that they have a large template of a

[Rcpp-devel] Exposing constructors

2010-11-04 Thread Romain Francois
Hello, This question has come up a few times now. How can I use another constructor than the default constructor in a class exposed by Rcpp modules. I've made a few changes to Rcpp to allow that. The new restriction is that : - we can only expose one constructor (we need to think about vario

[Rcpp-devel] finding an undefined symbol

2010-11-04 Thread Andrew Redd
I'm writing a rather complicated package using CUDA and Rcpp. I have everything compile and link ok, but when loading I get a > "unable to load shared object ..." > "... undefined symbol: _ZN5data39initSwabsESt6vector..." Does anyone have any advice how to fix this and/or figure out what exactl

[Rcpp-devel] Matrix assignment with inline

2010-11-04 Thread Kaveh Vakili
Hi list, I'm trying to learn inline by translating snippets of c++ code from the book "Numerical Recipes". in page 44-45, there is a c++ code to perform Gauss-Jordan elimination of a matrix (see below). I understand that they have a large template of additional operator/function/class (it is o