|
From: Dirk E. <ed...@de...> - 2013-10-26 20:56:06
|
Hi Peter,
On 26 October 2013 at 21:34, Peter Caspers wrote:
| is it possible to build the SWIG R package with -std=c++11 ? As far
| as I can see during the execution of R CMD check R one step
|
| * checking whether package ‘QuantLib’ can be installed ... ERROR
|
| fails because some hard coded (?) configuration (not related to the one
| produced with the usual ./configure ... call) is used here, in the log
| R.Rcheck/00install.out I get
|
| make[3]: Entering directory `/home/peter/quantlibpc/QuantLib-SWIG/R/src'
| g++ -I/usr/share/R/include -DNDEBUG `quantlib-config --cflags` -fpic -O3 -pipe -g -c QuantLib.cpp -o QuantLib.o
|
| which fails because of some c++11 elements in my client quantlib code.
Interesting question. The whole 'R and C++11' nexus is a little toxic (as the
CRAN gatekeepers exists on the older standard; some of us are working behind
the scenes to change that). By and large, using -std=c++11 should not bite.
We use it for a things with Rcpp, but because we cannot (yet!!) upload to
CRAN with it, there isn't as much testing for C++11.
R itself is in C and does not care. Boost may care (and Boost 2.0 will be
guaranteed to work this way). No idea about Swig. I haven't built the QL-Swig
bindings in a while.
Now, your post doesn't actually show the error. What happens when you simply
set appropriate CXXFLAGS as in
CXXFLAGS= -g -O3 -Wall -pipe -Wno-unused -pedantic -std=c++11
(I usually do that in ~/.R/Makevars; you can also set it per package in
src/Makevars).
Can you try and report back?
Dirk
--
Dirk Eddelbuettel | ed...@de... | http://dirk.eddelbuettel.com
|