Hi guys,
The code is now working, but I found a strange behaviour: if I use emcc to compile the c code into JavaScript, the final js file would run forever on Node.js. But if I change to use em++, everything works just fine.
The same code is compiled and run successfully on clang/clang++ as a native application, so I suppose this is not cause by the original LLVM compiler. So I want to ask if anyone could give me a hint on how to compare the js code emitted by emcc and em++? I tried to take a look at the js code directly, but it is a ~7MB file without optimizing-_- I really appreciate it if someone could show me a direction to go:)
Thanks for your help. Wish everyone had a great time hacking emscripten!
Xuejie Xiao