From jeroenooms at gmail.com  Mon Mar 20 17:28:36 2017
From: jeroenooms at gmail.com (Jeroen Ooms)
Date: Mon, 20 Mar 2017 17:28:36 +0100
Subject: [Rd] Experimental CXX_STD problem in R 3.4
In-Reply-To: <1489954147228.25309@iarc.fr>
References: <CABFfbXuox21GEDFMVAwzrHYbodRo3+eWAacz7dyRqnudMkPnrQ@mail.gmail.com>
	<22733.19068.582932.665707@max.eddelbuettel.com>
	<1489954147228.25309@iarc.fr>
Message-ID: <CABFfbXtAo90FAYXxTr5hM23SdCZ6uDpHGtz=NDhkmfVOMLdmUA@mail.gmail.com>

On Sun, Mar 19, 2017 at 9:09 PM, Martyn Plummer <plummerm at iarc.fr> wrote:
> I have just added some code to ensure that the compilation fails with an informative error message if a specific C++ standard is requested but the corresponding compiler has not been defined. Please test this.

I can confirm that (at least on Windows) we get a proper error message
for CXX14 and CXX17, eg:

  * installing *source* package 'testcxx' ...
  ** libs
  Error in .shlib_internal(args) :
   C++14 standard requested but CXX1Y is not defined
  * removing 'C:/Program Files/R/R-devel/library/testcxx'

CXX98 still does not work though. It seems SHLIB_CXX98LD is undefined
on Windows?

  * installing *source* package 'testcxx' ...
  ** libs
  c:/Rtools/mingw_64/bin/g++  -std=gnu++98
-I"C:/PROGRA~1/R/R-devel/include" -DNDEBUG
-I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2
-c test.cpp -o test.o
  -shared -s -static-libgcc -o testcxx.dll tmp.def test.o
-Ld:/Compiler/gcc-4.9.3/local330/lib/x64
-Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-devel/bin/x64
-lR
  -shared: not found
  no DLL was created
  ERROR: compilation failed for package 'testcxx'



[Rd] Experimental CXX_STD problem in R 3.4
Jeroen Ooms