Closed idini closed 9 years ago
Emscripten by default will warn on unresolved symbols, and not give an error. You can build with -s ERROR_ON_UNDEFINED_SYMBOLS=1
if you prefer errors.
See http://kripken.github.io/emscripten-site/docs/getting_started/FAQ.html#why-do-functions-in-my-c-c-source-code-vanish-when-i-compile-to-javascript-and-or-i-get-no-functions-to-process for some general info on why code might not exist after compilation (see in particular the .a
section). More generally, you can use llvm-nm
to scan the object files you are linking to see if everything you need is indeed there.
Thanks @kripten!
HI all. There is a problem when compile with the vcg library (http://vcg.isti.cnr.it/vcglib/): the emcc compiler doesn't report any error but many of the most important methods are ignored. It seems to ignore code imported from library. This is my Github repository where you can find my code: https://github.com/cignoni/meshlabjs/tree/master/test/LoadProcRender1.2 My project needs to include the vcg library above This is the output of the compiler:
and this is the cpp source:
I'm sure that the code above is not wrong, because when I use a different part of the library (import_off) works well. For example, LoadProcRender1.1 (https://github.com/cignoni/meshlabjs/tree/master/test/LoadProcRender1.1) works fine.
I don't understand what is the problem: the compiler doesn't report errors but seems to ignore part of the code. Thanks all.