[Rcpp-devel] Compilation on MAC OS X 10.7.2

Romain François romain at r-enthusiasts.com
Wed Dec 7 16:59:16 CET 2011


Bonjour Remi,

Could you send a reproducible example using tr1::unordered_map so that 
we can help you.

Cordialement,

Romain

Le 07/12/11 16:55, Rémi Lebret a écrit :
> Hi,
>
> I got this error when I'm trying to compile my package using Rcpp :
>
> g++-4.2 -arch i386 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/i386 
>  -I/usr/local/include 
> -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
>   -fPIC  -g -O2 -c clusteringMain.cpp -o clusteringMain.o
> In file included from /usr/include/c++/4.2.1/tr1/unordered_map:38,
>                  from 
> /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include/RcppCommon.h:130,
>                  from 
> /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include/Rcpp.h:27,
>                  from clusteringMain.cpp:91:
> /usr/include/c++/4.2.1/tr1/functional_hash.h: In member function 
> 'size_t std::tr1::hash<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > >::operator()(const std::string&) const':
> /usr/include/c++/4.2.1/tr1/functional_hash.h:144: error: 'const struct 
> std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> >' has no member named 'Rf_length'
> /usr/include/c++/4.2.1/tr1/functional_hash.h: In member function 
> 'size_t std::tr1::hash<std::basic_string<wchar_t, 
> std::char_traits<wchar_t>, std::allocator<wchar_t> > 
> >::operator()(const std::wstring&) const':
> /usr/include/c++/4.2.1/tr1/functional_hash.h:156: error: 'const struct 
> std::basic_string<wchar_t, std::char_traits<wchar_t>, 
> std::allocator<wchar_t> >' has no member named 'Rf_length'
> make: *** [clusteringMain.o] Error 1
>
> It looks like there is a problem with the tr1::unordered_map
>
> Any help ?
>
> Rémi
>
> Rémi Lebret
> Ingénieur de recherche CNRS
> Laboratoire de mathématiques de Lille1 - UMR 8524
> Batiment M3 - Bureau 322
> Tel: 03 20 43 67 82
> remi.lebret at math.univ-lille1.fr <mailto:remi.lebret at math.univ-lille1.fr>
>
>
>
> _______________________________________________
> 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
http://romainfrancois.blog.free.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20111207/22cf9f01/attachment.htm>


More information about the Rcpp-devel mailing list