Looks like the same problem described here in http://stackoverflow.com/questions/15489065/rcppeclipse-on-mac-os-x/15532241#15532241 due to Rcpp having a file named string.h which can conflict with std. Perhaps try using the -idirafter directive? Best, Ian
On Apr 18, 2014, at 3:00 AM, <rcpp-devel-request at lists.r-forge.r-project.org> <rcpp-devel-request at lists.r-forge.r-project.org> wrote:
Send Rcpp-devel mailing list submissions to rcpp-devel at lists.r-forge.r-project.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel or, via email, send a message with subject or body 'help' to rcpp-devel-request at lists.r-forge.r-project.org You can reach the person managing the list at rcpp-devel-owner at lists.r-forge.r-project.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Rcpp-devel digest..." Today's Topics: 1. Re: Rcpp11 3.1.0 is on CRAN (Dirk Eddelbuettel) 2. Rcpp is now at 200 CRAN and 27 BioC packages (Dirk Eddelbuettel) 3. Compiling issue about Rcpp (Wen YOU) 4. Re: Compiling issue about Rcpp (Dirk Eddelbuettel) ---------------------------------------------------------------------- Message: 1 Date: Thu, 17 Apr 2014 06:25:45 -0500 From: Dirk Eddelbuettel <edd at debian.org> To: Romain Fran?ois <romain at r-enthusiasts.com> Cc: "rcpp-devel at lists.r-forge.r-project.org" <rcpp-devel at lists.r-forge.r-project.org> Subject: Re: [Rcpp-devel] Rcpp11 3.1.0 is on CRAN Message-ID: <21327.47673.267145.585466 at max.nulle.part> Content-Type: text/plain; charset=iso-8859-1 On 17 April 2014 at 09:24, Romain Fran?ois wrote: | Now, as Dirk says, you can use C++11 with Rcpp. Just as much as you can use C++11 with vanilla .Call/.C. Yes of course. As R in a C program, and as .C (no SEXP) and .Call (SEXP interface) are C interfaces, Rcpp and Rcpp11 are in the exact same boat. There is no advantage at the interface level. Everything turns to C the moment we interface R. Beyond that point, we can use C++ in all its features, including C++11. Rcpp has supported the option of C++11 as long as the compilers have as it required just an optional switch. Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com ------------------------------ Message: 2 Date: Thu, 17 Apr 2014 06:41:59 -0500 From: Dirk Eddelbuettel <edd at debian.org> To: rcpp-devel <rcpp-devel at lists.r-forge.r-project.org> Subject: [Rcpp-devel] Rcpp is now at 200 CRAN and 27 BioC packages Message-ID: <21327.48647.771925.239781 at max.nulle.part> Content-Type: text/plain; charset=us-ascii Earlier this week we passes a new milestone: there are now 200 packages on CRAN which use Rcpp. And with the BioConductor 2.14 release, there are now another 27 packages in BioConductor. This is a very humbling number, and we are very happy that Rcpp is finding such wide, and rapidly growing, use. Speaking for the Rcpp Core team, we will try our best to maintain (and extend) the interface and functionality provided by the package for your use in "Programming with Data" (to quote John's wonderful book title). R and C++ make a fantastic combination for that, and we are so glad our interface layer and tool is finding such wide and growing use. Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com ------------------------------ Message: 3 Date: Fri, 18 Apr 2014 09:22:28 +0800 From: Wen YOU <youwen1991 at gmail.com> To: rcpp-devel at lists.r-forge.r-project.org Subject: [Rcpp-devel] Compiling issue about Rcpp Message-ID: <CAGSub8BMFGxwhqmkqXYr0D6XGWUsfXP_tQHedth1hOwjExwQ5Q at mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi, all I am new to Rcpp and might need some of your help, thanks a lot. I was trying to compile my Rcpp program in eclipse. But I met a lot of errors when I was trying to do so. Most of the error comes from the String.h. Here is the command and part of error: *g++ -DINSIDE -ID:/R/R-3.1.0/include -ID:/R/R-3.1.0/library/RInside/include -ID:/R/R-3.1.0/library/Rcpp/include -ID:/R/R-3.1.0/library/Rcpp/include/Rcpp -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/rcpp_hello_world.d" -MT"src/rcpp_hello_world.d" -o "src/rcpp_hello_world.o" "../src/rcpp_hello_world.cpp"* *In file included from D:/R/R-3.1.0/include/R_ext/RS.h:26:0,* * from D:/R/R-3.1.0/include/R.h:50,* * from D:/R/R-3.1.0/library/Rcpp/include/RcppCommon.h:36,* * from D:/R/R-3.1.0/library/Rcpp/include/Rcpp.h:27,* * from ../src/rcpp_hello_world.cpp:2:* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:52:17: error: 'internal' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:53:17: error: 'internal' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:66:21: error: expected ')' before 'charsxp'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:71:23: error: 'StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:71:36: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:75:23: error: 'const_StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:75:42: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:75:9: error: 'Rcpp::String::String(const int&)' cannot be overloaded* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:71:9: error: with 'Rcpp::String::String(const int&)'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:103:23: error: expected ')' before 'x'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:108:35: error: declaration of 'operator=' as non-function* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:108:32: error: expected ';' at end of member declaration* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:108:41: error: expected ')' before 'x'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:111:35: error: declaration of 'operator=' as non-function* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:111:32: error: expected ';' at end of member declaration* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:111:40: error: expected ')' before 'x'* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:112:41: error: 'StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:112:54: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:170:42: error: 'StringProxy' does not name a type* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:170:55: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:178:36: error: declaration of 'operator+=' as non-function* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:178:32: error: expected ';' at end of member declaration* *D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:178:41: error: expected ')' before 'x'* Can someone please help? Great thanks. Best regards, Wen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140418/b9bb054b/attachment-0001.html> ------------------------------ Message: 4 Date: Thu, 17 Apr 2014 20:36:35 -0500 From: Dirk Eddelbuettel <edd at debian.org> To: Wen YOU <youwen1991 at gmail.com> Cc: rcpp-devel at lists.r-forge.r-project.org Subject: Re: [Rcpp-devel] Compiling issue about Rcpp Message-ID: <21328.33187.755677.434608 at max.nulle.part> Content-Type: text/plain; charset=iso-8859-1 Wen, On 18 April 2014 at 09:22, Wen YOU wrote: | I am new to Rcpp and might need some of your help, thanks a lot. | I was trying to compile my Rcpp program in eclipse. But I met a lot of errors | when I was trying to do so. Most of the error comes from the String.h. Here is | the command and part of error: | | g++ -DINSIDE -ID:/R/R-3.1.0/include -ID:/R/R-3.1.0/library/RInside/include -ID: | /R/R-3.1.0/library/Rcpp/include -ID:/R/R-3.1.0/library/Rcpp/include/Rcpp -O0 | -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/rcpp_hello_world.d" -MT"src/ | rcpp_hello_world.d" -o "src/rcpp_hello_world.o" "../src/rcpp_hello_world.cpp" | In file included from D:/R/R-3.1.0/include/R_ext/RS.h:26:0, | ? ? ? ? ? ? ? ? ?from D:/R/R-3.1.0/include/R.h:50, | ? ? ? ? ? ? ? ? ?from D:/R/R-3.1.0/library/Rcpp/include/RcppCommon.h:36, | ? ? ? ? ? ? ? ? ?from D:/R/R-3.1.0/library/Rcpp/include/Rcpp.h:27, | ? ? ? ? ? ? ? ? ?from ../src/rcpp_hello_world.cpp:2: | D:/R/R-3.1.0/library/Rcpp/include/Rcpp/string.h:52:17: error: 'internal' does | not name a type [...] | Can someone please help? Great thanks. You have not shown a reproducible error in Rcpp. What you have shown is that you failed to build something using Eclipse. Which may be well a setup error on your part. We support an R package which is fairly rigorously tested and which supports 'R CMD INSTALL .....' for various values of '.....' (and various different incantations, including RStudio which tries hard (and successfully) to behave just like R by invoking R as R). For everything else, you are mostly on your own. Windows is twice as hard because of its inconsistent $PATH etc. I would try to build something simple first, either directly with R or via RStudio, so that you know that the code works, and then migrate a known working setup to your chosen environment. Good luck, Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com ------------------------------
_______________________________________________ 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 End of Rcpp-devel Digest, Vol 54, Issue 21 ******************************************