[Rcpp-devel] package with module not compiling on Mac

Romain Francois romain at r-enthusiasts.com
Thu Jan 31 11:52:19 CET 2013


Hello,

I can reproduce the compiler error on my mac. If I comment the methods 
Swap and Etoile, then I can compile the package.

Now looking at the signatures:

cplfunction & Swap(double y) ;
cplfunction & Etoile() ;

I think the problem is that they return a reference. Looking at their 
code, it looks like they only ever return *this. Why are you doing this ?

I'd suggest you return void.

Romain

Le 29/01/13 16:04, Robin Girard a écrit :
>
> The Mac version of my package http://cran.r-project.org/web/packages/ConConPiWiFun/index.html
> (using Rcpp module) does not compile.
> the error message is here
> http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/ConConPiWiFun-00install.html
>
> and contains "no matching function for call to 'module_wrap(cplfunction&)'" does it means that I might have called things in the wrong order in my cpp code ?
>
> my cpp code starts like that
> #include <map>
> #include <math.h>
> #include <limits>
> #include <Rcpp.h>
>
> using namespace std;
> using namespace Rcpp;
> class cplfunction ;
> RCPP_EXPOSED_CLASS(cplfunction)
>
>
> is there something like win-builder but for mac ?
>
> All the best
> Robin
>
> Dr. Girard Robin
> Chargé de Recherche
>
> MINES-ParisTech / Département Energétique et Procédés / PERSEE / Groupe ERSEI
> Centre Procédés, Energies Renouvelables et Systèmes Energétiques (PERSEE)
> Center for Processes, Renewables Energies and Energy Systems
> Renewable Energies & Smartgrids (ERSEI)
>
> 1 Rue Claude Daunesse - CS 10207 - F-06904 Sophia Antipolis Cedex
> Tel: +33.4.93.67.89.64 (~99), Fax: +33.4.93.95.75.35
> e-mail : robin.girard at mines-paristech.fr
>
> web page perso http://www.mines-paristech.fr/Services/Annuaire/&?id=8828
> statoverflow : http://stats.stackexchange.com/users/223/robin-girard
> web page centre PERSEE : http://www.cep.mines-paristech.fr/
> linkedin : http://www.linkedin.com/profile/view?id=14907272&trk=tab_pro
>
> Le lien vaut mieux que le bien.
> ________________________________________________________
>
> CONFIDENTIALITY : This  e-mail  and  any attachments are
> confidential and may be privileged. If  you are not a
> named recipient, please notify the sender immediately and
> do not disclose the contents to another person, use it for
> any purpose or store or copy the information in any medium.
>
> CONFIDENTIALITE : Ce message et les éventuelles pièces
> attachées sontconfidentiels et peuvent être une
> communication protégée. Si vous n'êtes pas dans la liste
> des destinataires, veuillez informer l'expéditeur
> immédiatement et ne pas ouvrir ni divulguer le contenu
> à une tierce personne, ne pas l'utiliser pour quelque
> raison que ce soit, ne pas stocker ou copier l'information
> qu'il contient sur un quelconque support.
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30

R Graph Gallery: http://gallery.r-enthusiasts.com

blog:            http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with Rcpp modules
`- http://bit.ly/Thw7IK : Rcpp modules more flexible



More information about the Rcpp-devel mailing list