When I try to compile a C++ script in R using Rcpp, I got the following error message:
Error in dyn.load("/private/var/folders/46/1tz_54_n3glfmgftvqsspwrr0000gn/T/RtmprF007X/sourceCpp-x86_64-apple-darwin17.0-1.0.6/sourcecpp_438303cc5b8/sourceCpp_4.so") :
unable to load shared object '/private/var/folders/46/1tz_54_n3glfmgftvqsspwrr0000gn/T/RtmprF007X/sourceCpp-x86_64-apple-darwin17.0-1.0.6/sourcecpp_438303cc5b8/sourceCpp_4.so':
dlopen(/private/var/folders/46/1tz_54_n3glfmgftvqsspwrr0000gn/T/RtmprF007X/sourceCpp-x86_64-apple-darwin17.0-1.0.6/sourcecpp_438303cc5b8/sourceCpp_4.so, 6): Symbol not found: ___addtf3
Referenced from: /usr/local/lib/libquadmath.0.dylib
Expected in: /usr/local/lib/libgcc_s_x86_64.1.dylib
in /usr/local/lib/libquadmath.0.dylib
The problem looks just related to compiling a script, since a simple command as Rcpp::evalCpp("1 + 1") works.
My system is MacOS 10.15.7, the Xcode version is 11.4 and when I type gcc --version it returns
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin