[Rcpp-devel] Fwd: List of uniform_int_distribution objects

2016-04-26 Thread aakremena
Hi all, I have decided to follow Dirk's advice and use more classical STL containers rather than Rcpp::List one. It works for me but I admit that I am still in the dark as to why the Rcpp::List way doesn't work. Thus, I consider this topic closed. Thanks. Anguel -Original Messag

Re: [Rcpp-devel] List of uniform_int_distribution objects

2016-04-26 Thread Dirk Eddelbuettel
On 26 April 2016 at 14:45, aakrem...@aol.com wrote: | Hi everybody, | |1. I am trying to create an Rcpp list, each of whose elements contain an | uniform_int_distribution object. | |2. My understanding is that since an uniform_int_distribution object is a | non-SEXP one, I need to create

[Rcpp-devel] Fwd: List of uniform_int_distribution objects

2016-04-26 Thread aakremena
In fact I mightily misspoke (apologies). The Rcpp list is of course not meant to be exported out of the Rcpp code but to be used inside another Rcpp function. But the code fails with a similar message: Error in dyn.load("/var/folders/12/bqytpkx93w97r3s3_h9q9k_0gn/T//Rtmpm2tVkx/sourcecp

[Rcpp-devel] List of uniform_int_distribution objects

2016-04-26 Thread aakremena
Hi everybody, 1. I am trying to create an Rcpp list, each of whose elements contain an uniform_int_distribution object. 2. My understanding is that since an uniform_int_distribution object is a non-SEXP one, I need to create a specialization of wrap() first. 3. To this end, I am using

Re: [Rcpp-devel] NLopt linking problem

2016-04-26 Thread Dirk Eddelbuettel
Hi Jens, On 26 April 2016 at 17:50, Jens Johannsen wrote: | I'm aware of the nloptr CRAN package, but not using that package as the | objective function (and gradient) being optimized as to be in C++. Defining the | function in R and then calling back and forth between R  and C++ using the | nlo

Re: [Rcpp-devel] deprecated log_max warning

2016-04-26 Thread Yue Li
I see. Thank you Dirk. Yue > On Apr 26, 2016, at 11:33 AM, Dirk Eddelbuettel wrote: > > > On 21 April 2016 at 16:31, Yue Li wrote: > | Thank you Dirk and Yixuan! Indeed, '-Wno-deprecated-declarations’ suppresses > | the warning. > > And just to follow-up, this has now been fixed upstream in Ar

Re: [Rcpp-devel] NLopt linking problem

2016-04-26 Thread Balamuta, James Joseph
Greetings and Salutations, Try setting the environment variable NLOPT_HOME with the location of the NLopt library and then add to the Makevars.win file: PKG_CFLAGS = -I"$(NLOPT_HOME)$(R_ARCH)/include" PKG_LIBS = -L"$(NLOPT_HOME)$(R_ARCH)/lib" -lnlopt_cxx Sincerely, JJB From: rcpp-devel-boun..

Re: [Rcpp-devel] NLopt linking problem

2016-04-26 Thread Jens Johannsen
Hi Dirk, Thanks for the quick reply. I'm aware of the nloptr CRAN package, but not using that package as the objective function (and gradient) being optimized as to be in C++. Defining the function in R and then calling back and forth between R and C++ using the nloptr package is too costly time

Re: [Rcpp-devel] NLopt linking problem

2016-04-26 Thread Dirk Eddelbuettel
Jens, On 26 April 2016 at 17:22, Jens Johannsen wrote: | Dear Rcpp-Devels, List, | | I'm struggling with building a Rcpp package linking to the NLopt library (http: | //ab-initio.mit.edu/wiki/index.php/NLopt). Before we get any further, is there a reason you are NOT using the CRAN package doin

Re: [Rcpp-devel] deprecated log_max warning

2016-04-26 Thread Dirk Eddelbuettel
On 21 April 2016 at 16:31, Yue Li wrote: | Thank you Dirk and Yixuan! Indeed, '-Wno-deprecated-declarations’ suppresses | the warning. And just to follow-up, this has now been fixed upstream in Armadillo too. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _

[Rcpp-devel] NLopt linking problem

2016-04-26 Thread Jens Johannsen
Dear Rcpp-Devels, List, I'm struggling with building a Rcpp package linking to the NLopt library (*http://ab-initio.mit.edu/wiki/index.php/NLopt *). I'm on Windows and I've the following files in \src: - Makevars.in - Makevars.win - Rcpp_pr