Open yulanvanoppen opened 4 years ago
A compilation error is generated upon including the boost/multiprecision/cpp_dec_float.hpp
Compiling (running library(TMB); compile("file.cpp") in R) the following C++ code currently generates a compilation error:
library(TMB); compile("file.cpp")
#include <TMB.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> // high precision floats template<class Type> Type objective_function<Type>::operator() () { return Type(0); }
However, this is not an issue when including boost/multiprecision/cpp_bin_float.hpp instead.
boost/multiprecision/cpp_bin_float.hpp
make: *** [/usr/lib/R/etc/Makeconf:177: file.o] Error 1 Error in compile("mwe.cpp") : Compilation failed
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o file.so file.o -L/usr/lib/R/lib -lR
1.7.18
R version 3.6.3 (2020-02-29)
Ubuntu 20.04 LTS
Description:
A compilation error is generated upon including the boost/multiprecision/cpp_dec_float.hpp
Reproducible Steps:
Compiling (running
library(TMB); compile("file.cpp")
in R) the following C++ code currently generates a compilation error:However, this is not an issue when including
boost/multiprecision/cpp_bin_float.hpp
instead.Current Output:
Expected Output:
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o file.so file.o -L/usr/lib/R/lib -lR
TMB Version:
1.7.18
R Version:
R version 3.6.3 (2020-02-29)
Operating System:
Ubuntu 20.04 LTS