emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Node with Emscripten

Open lampard8 opened this issue 14 years ago • 2 comments

Hi ,

when I typed : "nab @nab : ~ /llvm/test $ node test.c "

it gives me this error :

node.js: 134 throw e; / / process.nextTick error, or 'error' event on first tick ^ SyntaxError: Unexpected token ILLEGAL Has Module._compile (module.js: 397:25) at .. js Object (module.js: 408:10) Has Module.load (module.js: 334:31) Has Function._load (module.js: 293:12) at Array. (module.js: 421:10) Has EventEmitter._tickCallback (node.js: 126:26)

lampard8 avatar Aug 15 '12 04:08 lampard8

node runs JavaScript, and test.c contains C code.

Perhaps you want to compile the C to JS using something like emcc test.c -o test.js and then do node test.js.

kripken avatar Aug 15 '12 21:08 kripken

I think this issue can be closed.

int3 avatar Jul 02 '13 21:07 int3