On Wed, 2018-02-07 at 15:17 +0300, Alexander Loboda wrote: > 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.
There is no interaction between C++ standards and user-defined OBJECTS. I have checked this on one of my own packages, which works perfectly well when I move the sources into a sub-directory. If you want further help you will need to share your package source. Martyn > Thanks! > Alex > > [[alternative HTML version deleted]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel