I'm relatively inexperienced piling C code. Nevertheless, I'm trying to use emscripten to pile an algorithm from the R source code into JavaScript. The function is in a file called pf.c
here
Naively, I have just gone into the src
directory and tried:
emcc nmath/pf.c
This results in:
In file included from nmath/pf.c:25:
nmath/nmath.h:38:10: fatal error: 'Rconfig.h' file not found
#include <Rconfig.h>
^
1 error generated.
ERROR root: piler frontend failed to generate LLVM bitcode, halting
I know where this header is:
$ find . -name "Rconfig.h"
./gnuwin32/fixed/h/Rconfig.h
My immediate question is, how do I tell the piler where this header exists?
I'd like to end up with a pf
function in JavaScript. Any insight into this idea would be appreciated.
I'm relatively inexperienced piling C code. Nevertheless, I'm trying to use emscripten to pile an algorithm from the R source code into JavaScript. The function is in a file called pf.c
here
Naively, I have just gone into the src
directory and tried:
emcc nmath/pf.c
This results in:
In file included from nmath/pf.c:25:
nmath/nmath.h:38:10: fatal error: 'Rconfig.h' file not found
#include <Rconfig.h>
^
1 error generated.
ERROR root: piler frontend failed to generate LLVM bitcode, halting
I know where this header is:
$ find . -name "Rconfig.h"
./gnuwin32/fixed/h/Rconfig.h
My immediate question is, how do I tell the piler where this header exists?
I'd like to end up with a pf
function in JavaScript. Any insight into this idea would be appreciated.
1 Answer
Reset to default 7Use -I
to add to the include search path.
emcc nmath/pf.c -Ignuwin32/fixed/h/
Regarding the overall idea... sounds weird, I don't know.