Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > system("clang++ -v")
- Apple LLVM version 10.0.0 (clang-1000.11.45.2)
- Target: x86_64-apple-darwin17.7.0
- Thread model: posix
- InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
- > # check toolchain
- > fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , '
- + return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
- + ' )
- In file included from file823bc75ebc.cpp:3:
- In file included from /Library/Frameworks/R.framework/Resources/include/R.h:47:
- In file included from /usr/local/clang4/bin/../include/c++/v1/cstdlib:86:
- /usr/local/clang4/bin/../include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
- #include_next <stdlib.h>
- ^~~~~~~~~~
- 1 error generated.
- make: *** [file823bc75ebc.o] Error 1
- ERROR(s) during compilation: source code errors or compiler configuration errors!
- Program source:
- 1:
- 2: // includes from the plugin
- 3: #include <R.h>
- 4: #include <Rdefines.h>
- 5: #include <R_ext/Error.h>
- 6:
- 7:
- 8: // user includes
- 9:
- 10:
- 11: // declarations
- 12: extern "C" {
- 13: SEXP file823bc75ebc( SEXP x, SEXP y) ;
- 14: }
- 15:
- 16: // definition
- 17:
- 18: SEXP file823bc75ebc( SEXP x, SEXP y ){
- 19:
- 20: return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
- 21:
- 22: Rf_warning("your C++ program does not return anything");
- 23: return R_NilValue ;
- 24: }
- 25:
- 26:
- Error in compileCode(f, code, language = language, verbose = verbose) :
- Compilation ERROR, function(s)/method(s) not created! In file included from file823bc75ebc.cpp:3:
- In file included from /Library/Frameworks/R.framework/Resources/include/R.h:47:
- In file included from /usr/local/clang4/bin/../include/c++/v1/cstdlib:86:
- /usr/local/clang4/bin/../include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
- #include_next <stdlib.h>
- ^~~~~~~~~~
- 1 error generated.
- make: *** [file823bc75ebc.o] Error 1
- In addition: Warning message:
- In system(cmd, intern = !verbose) :
- running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file823bc75ebc.cpp 2> file823bc75ebc.cpp.err.txt' had status 1
- >
Add Comment
Please, Sign In to add comment