[R-pkg-devel] Using C++11 and compilation in sub-directories together
Alexander Loboda
loboda at rain.ifmo.ru
Wed Feb 7 13:17:23 CET 2018
Dear all,
I'm trying to build a package that uses c++11 code and sub-directories
in src/ according to the "Writing R Extensions" manual, but it seems
like R CMD doesn't want to compile the code with c++11 flags when source
files(actually, corresponding object files) are listed in the OBJECTS
variable in the Makevars file. That is, if I do not use sub-directories,
everything is fine. All of the code is compiling with c++11 flags, but
when I try to add hierarchy in src/ directory and use the OBJECTS
variable, the compilation fails because of lack of c++11 flags. Makevars
file contains such content:
CXX_STD = CXX11
OBJECTS_SMTH = subdir/main.o
OBJECTS = $(OBJECTS_SMTH)
It would be very nice if there is some possibility of using both of
these features. I'm using R 3.4.2 and Ubuntu 17.10.
Thanks!
Alex
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list