Runtime linking R-extension on MacOS
问题 I have installed the ArrayFire library using the binary installer for MacOS which puts the libraries into /usr/local/lib . I can compile and run simple examples, e.g. #include <arrayfire.h> #include <stdio.h> int main() { unsigned int count; af_get_backend_count(&count); printf("backends: %d\n", count); return 0; } gives $ /usr/local/clang4/bin/clang -laf -o minimal minimal.c $ ./minimal backends: 2 Now I want to do the equivalent thing in R. I have #include <arrayfire.h> #include <Rinternals