lukewagner / polyfill-prototype-1

Experimental WebAssembly polyfill library and tools
Apache License 2.0
241 stars 42 forks source link

error: use of undeclared identifier 'emscripten_print_double' #15

Open hustlibraco opened 9 years ago

hustlibraco commented 9 years ago

I try to run this prototype, I got the latest emscripten and make it, but I got this, Any tips showed to me to fix it?

[root@localhost polyfill-prototype-1]# make
emcc -DNDEBUG -O3 -std=c++11 -Wall -pedantic \
             --memory-init-file 0 --llvm-lto 1 -s TOTAL_MEMORY=67108864 \
             src/unpack.cpp \
             -o jslib/load-wasm-worker.js
src/unpack.cpp:279:11: error: use of undeclared identifier 'emscripten_print_double'
    len = emscripten_print_double(d, buf);
          ^
1 error generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
make: *** [jslib/load-wasm-worker.js] Error 1
kripken commented 9 years ago

You probably need a newer emscripten, that API was added fairly recently (for this polyfill, in fact).

hustlibraco commented 9 years ago

Actually it's the newest version. Plus, looking very forward to this API.

kripken commented 9 years ago

Oh, sorry, my mistake. This is just in the wasm-polyfill-prototype branch in emscripten so far, which has not yet been merged to incoming or master.