A quick addendum: when calling the compiled binary via node.js (rather than local serving to the browser) I get the message 'ReferenceError: document is not defined'.
I am attempting to preload a file for local use using the following: *target_link_libraries(plyv "--preload-file apple.ply")* As I understand it, this syntax will expect the referenced file in the calling path. On Wednesday, December 15, 2021 at 9:16:59 PM UTC-8 Kevin Cain wrote: > Thanks @Floh for your suggestions; to answer your question, I'm using > emcmake + emmake -- I see build warnings *except* noting that libraries > will be compiled statically, not dynamically. Nothing about missing > functions per se. > > Since the exceptions are uncaught, I don't get any explicit exception > message. I'm using Chrome tools to trace execution, but perhaps through > unfamiliarity I'm missing something. > > Thanks, > > -Kevin > > On Tuesday, December 14, 2021 at 4:44:59 AM UTC-8 Floh wrote: > >> What do the exception messages say? Also are you seeing any suspicious >> messages about missing functions in the build process? E.g. if any GL >> functions are not implemented by the Emscripten WebGL wrapper it would most >> likely already show up as warnings during the linker stage. >> >> Another (more likely) reason is that the code which worked fine on >> "desktop GL" has problems with WebGL's much stricter specification and >> validation, in that case the error messages in the JS console usually >> provide a hint about what's going wrong. >> >> The only advice I can give regarding debugging is to compile with -g so >> that Emscripten doesn't do any minification or name mangling, that way the >> callstack in the exception messages is readable (functions have their >> expected names instead of being minified). IME usually that's enough to >> figure out what's going wrong. >> >> Cheers, >> -Floh. >> >> On Monday, 13 December 2021 at 07:53:59 UTC+1 [email protected] >> wrote: >> >>> I've made some first steps in Emscripten via the tutorials, and have now >>> begun to retarget a working program to the browser. >>> >>> The candidate program compiles without errors via CMake without any >>> special linker directive to limit the GL calls (LEGACY_GL_EMULATION, >>> MAX_WEBGL_VERSION=2) >>> with: >>> >>> *emcmake cmake -DPLATFORM=Web* >>> *emmake make* >>> >>> At runtime in a local python server I see uncaught exceptions. How might >>> I tell if those errors are due to limitations in Emscripen WebGL support? >>> >>> A more general question: how best to debug these exceptions in the >>> browser? >>> >> -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/c60b5f00-90c7-434e-ab81-16db5f3f84can%40googlegroups.com.
