Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-14 Thread Jian Kang
Hi, Dirk, I see. Thanks so much for your help. Best regards, Kent On Fri, Oct 14, 2011 at 4:39 PM, Dirk Eddelbuettel wrote: > > Hi Kent, > > On 14 October 2011 at 16:00, Jian Kang wrote: > | Hi, Dirk, > | > | Sorry for delay. > | > | I tried to install the R and Rtools again, and run the pro

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-14 Thread Richard Chandler
You can turn it off by setting the following environment variable CYGWIN=nodosfilewarning Richard On Fri, Oct 14, 2011 at 10:39 AM, Dirk Eddelbuettel wrote: > > Hi Kent, > > On 14 October 2011 at 16:00, Jian Kang wrote: > | Hi, Dirk, > | > | Sorry for delay. > | > | I tried to install the R

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-14 Thread Dirk Eddelbuettel
Hi Kent, On 14 October 2011 at 16:00, Jian Kang wrote: | Hi, Dirk, | | Sorry for delay.  | | I tried to install the R and Rtools again, and run the program again, then it | works.  Excellent! | But here is some warnings, I am not sure whether this is OK in the future. | | Compilation argume

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-14 Thread Jian Kang
Hi, Dirk, Sorry for delay. I tried to install the R and Rtools again, and run the program again, then it works. But here is some warnings, I am not sure whether this is OK in the future. Compilation argument: C:/R/Rsoft/bin/i386/R CMD SHLIB file7e446574.cpp 2> file7e446574.cpp.err.txt g++ -I"C

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Hadley Wickham
> | I wrote an function to check that you have a valid R development > | environment (with help from Simon Urbanek) for devtools.  See code > | below - and check with has_devel() > > Nice. We should borrow that idea as the issue comes up /a lot/. Please! > One improvement I would make--even thoug

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Dirk Eddelbuettel
On 13 October 2011 at 18:15, Jian Kang wrote: | Thanks for your reply. | | Here is the response of 'Hello World' program: | | > src='#include | + using namespace std; | + void main() | + { | + cout << "Hello World!" << endl; | + cout << "Welcome to C++ Programming" << endl; | + }' | >  | > fx <

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Dirk Eddelbuettel
On 13 October 2011 at 10:11, Hadley Wickham wrote: | > My best guess is that you have not installed the Rtools correctly.  Can you | > compile a simple 'hello, world' example in C or C++?  Can you rebuild R | > packages from source? | | I wrote an function to check that you have a valid R develop

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Jelmer Ypma
There are a couple of things: * As far as I know, 'src' should not include a main() statement, nor should it have #include statements (these can be added in the 'includes' argument in cxxfunction) * The first argument in cxxfunction is sig. Since you don't supply an explicitly named sig argument,

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Jian Kang
Thanks for your reply. Here is the response of 'Hello World' program: > src='#include + using namespace std; + void main() + { + cout << "Hello World!" << endl; + cout << "Welcome to C++ Programming" << endl; + }' > > fx <- cxxfunction(src,plugin = "Rcpp",verbose=T) >> setting environment varia

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Hadley Wickham
> My best guess is that you have not installed the Rtools correctly.  Can you > compile a simple 'hello, world' example in C or C++?  Can you rebuild R > packages from source? I wrote an function to check that you have a valid R development environment (with help from Simon Urbanek) for devtools.

Re: [Rcpp-devel] Request for help with compiling Rcpp example

2011-10-13 Thread Dirk Eddelbuettel
Hi, And thanks for posting here. On 13 October 2011 at 16:16, Slava Razbash wrote: | I am trying to compile the example program with "inline" from the | jstatsoft article by Eddelbuettel and Francois (2011). I am using | WinXP and R 2.13.2 and RCPP 0.9.7. I am using Rtools 2.14. | | My code: |