Message-ID: <74e7810d-6d2d-7e4f-659d-ee407266aa0b@rain.ifmo.ru>
Date: 2018-02-07T12:17:23Z
From: Alexander Loboda
Subject: [R-pkg-devel] Using C++11 and compilation in sub-directories together
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]]