[Rcpp-devel] Wierd compilation error

2014-01-29 Thread Alessandro Mammana
Hi all, I was experimenting with templates and Rcpp and trying to compile this code: // [[Rcpp::export]] static void readVector(Vector v){ traits::storage_type::type i = v[0]; Rcout << i << std::endl; } I got this error: scratchpad.cpp: In function 'SEXPREC* sourceCpp_3062_readVector(SE

Re: [Rcpp-devel] Wierd compilation error

2014-01-29 Thread Romain François
The attributes parser does not know how to handle the static keyword. Works for me without it. You get the line number of the generated file. Use verbose = TRUE to have a better clue at what is wrong. Romain Le 29 janv. 2014 à 12:24, Alessandro Mammana a écrit : > Hi all, > I was experiment

Re: [Rcpp-devel] Rcpp and required steps before next release

2014-01-29 Thread Dirk Eddelbuettel
On 28 January 2014 at 22:10, Dan Tenenbaum wrote: | Thanks. I was actually wondering something slightly different: for the ones that need modification, will they still work with the current Rcpp after being modified, or are the changes not backwards-compatible? I will investigate and I guess I

[Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Hi all, I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries in an R package. I need it to work in Windows, though, and I'm struggling to get things working. Environment: R 3,0,2 Rtools 3.0 cygwin Native CMake 2.8 cygwin 2.8 The cygwin CMake is convinced that the gcc installed

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
Hi Jamie, On 29 January 2014 at 10:39, Jamie Olson wrote: | Hi all, | I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries | in an R package. I need it to work in Windows, though, and I'm | struggling to get things working. | | Environment: | R 3,0,2 | Rtools 3.0 | cygwin ^^

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Thanks Dirk, I'll take a stab with MSys. Just wondering, though, why then are the Rtools commands based on cygwin instead of MSys? I thought that the RInside examples were to be built using Cygwin because they use the "Unix Makefiles" generator. I hadn't yet seen anything to indicate that was po

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
On 29 January 2014 at 11:05, Jamie Olson wrote: | Thanks Dirk, I'll take a stab with MSys. Just wondering, though, why | then are the Rtools commands based on cygwin instead of MSys? | | I thought that the RInside examples were to be built using Cygwin | because they use the "Unix Makefiles" gen

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Three more things: 1) Is the WIN.readme.txt in examples/eigen/cmake incorrect, then? 2) The Rtools documentation specifies that the Rtools paths should come BEFORE cygwin paths. Is there a similar rule for MSys? 3) Should I continue to just used the MinGW installed with Rtools or should I/can

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
On 29 January 2014 at 11:42, Jamie Olson wrote: | Three more things: | | 1) Is the WIN.readme.txt in examples/eigen/cmake incorrect, then? What part? Setting the CYGWIN env var is to just shut a noisy warning from Rtools off. It does not suggest you should use Cygwin. The rest seems correct

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Thanks! The WIN.readme.txt instructs you to run cmake -G "Unix Makefiles" .. It seems that the only cmake on windows that supports "Unix Makefiles" is the cygwin version, and from what you've said it sounds like that can't be used with the native MinGW required for Rcpp. --Jamie Jamie Olson

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
On 29 January 2014 at 13:03, Jamie Olson wrote: | Thanks! | | The WIN.readme.txt instructs you to run | | cmake -G "Unix Makefiles" .. | | It seems that the only cmake on windows that supports "Unix Makefiles" | is the cygwin version, and from what you've said it sounds like that | can't be use

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Thell Fowler
On Wed, Jan 29, 2014 at 9:39 AM, Jamie Olson wrote: > Hi all, > I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries > in an R package. I need it to work in Windows, though, and I'm > struggling to get things working. > > --- >8--- > It might help to state what c/c++ libraries

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
I'm trying to build the Avro-C library[http://avro.apache.org/docs/1.7.5/api/c/index.html]. There is a README for building in windows[http://svn.apache.org/repos/asf/avro/trunk/lang/c/README.maintaining_win32.txt] but it only has instructions for Visual Studio. I've recently been wondering if tha

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
On 29 January 2014 at 15:07, Jamie Olson wrote: | I'm trying to build the Avro-C | library[http://avro.apache.org/docs/1.7.5/api/c/index.html]. There is | a README for building in | windows[http://svn.apache.org/repos/asf/avro/trunk/lang/c/README.maintaining_win32.txt] | but it only has instruct

Re: [Rcpp-devel] Rcpp and required steps before next release

2014-01-29 Thread Dirk Eddelbuettel
several packages that are not Bioconductor packages: | | CDM | sirt | TAM | geiger Note the date. Kevin's page is a little dusty (~ 5 days). I am trying to keep https://github.com/RcppCore/rcpp-logs/blob/master/status/status-20140129.txt more current (which includes changing the url whic

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
1) When doing that, there won't be any problem using a different version of MinGW? 2) I'm guessing I'd want to do this in linux, to avoid including the cygwin dlls? --Jamie Jamie Olson On Wed, Jan 29, 2014 at 3:13 PM, Dirk Eddelbuettel wrote: > > On 29 January 2014 at 15:07, Jamie Olson wrote

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
On 29 January 2014 at 15:22, Jamie Olson wrote: | 1) When doing that, there won't be any problem using a different | version of MinGW? I thought we had been over this before: yes, mixing is a problem, so no, do not do this. Build R and Rcpp and your preferred libraries with the same version.

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Sorry, I think I just got confused. I meant cross-compiling from linux with mingw since cygwin's cmake is giving me trouble, but it's probably more effort than it's worth to get the same compiler. Thanks for all your help! --Jamie Jamie Olson On Wed, Jan 29, 2014 at 3:44 PM, Dirk Eddelbuettel

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel
On 29 January 2014 at 16:18, Jamie Olson wrote: | Sorry, I think I just got confused. I meant cross-compiling from | linux with mingw since cygwin's cmake is giving me trouble, but it's | probably more effort than it's worth to get the same compiler. Yes. Cross-compiling can work, but some of