Source file:
#include <setjmp.h>
jmp_buf buf;
int main() {
longjmp(buf, 8);
}
Compile/link:
$ emcc -c a.c
$ emcc a.o -fwasm-exceptions
error: undefined symbol: emscripten_longjmp (referenced by root reference (e.g. compiled C/C++ code
Would be nice if the error could say something roughly like:
a.o uses setjmp/longjmp but was compiled with incompatible ABI. Pass -fwasm-exceptions as a compile flag.