I am trying to install rstan 2.18.1 from source on Windows 10. My C++14 compiler flags are correctly set, stanHeaders 2.18 installs fine from source and also rstan x32 compilation and installation works smoothly.
Similarly the x64 version starts compiling quite a few files successfully, but then fails with
g++ -std=c++1y -shared -s -static-libgcc -o rstan.dll tmp.def chains.o init.o lang__ast_def.o lang__grammars__bare_type_grammar_inst.o lang__grammars__expression07_grammar_inst.o lang__grammars__expression_grammar_inst.o lang__grammars__functions_grammar_inst.o lang__grammars__indexes_grammar_inst.o lang__grammars__program_grammar_inst.o lang__grammars__semantic_actions.o lang__grammars__statement_2_grammar_inst.o lang__grammars__statement_grammar_inst.o lang__grammars__term_grammar_inst.o lang__grammars__var_deccls_grammar_inst.o lang__grammars__whitespace_grammar_inst.o misc.o pointer-tools.o sparse_extractors.o stanc.o -LC:/PROGRA~1/R/R-35~1.1/bin/x64 -lR
C:/PROGRA~1/R/R-35~1.1/bin/x64/R.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
which is strange, because the R.dll is clearly in its place.
@bgoodri I hope I didn’t overlook a topic discussing this issue, but I would expect that if I have it, many other windows users might have it as well.