You may need to force-include a system library if the library uses it but not the main file (see Linking wiki page). However, I am a little surprised that would be the case for the new() operator, unless the main file is not using libc (which includes malloc and new).
- Alon On Wed, May 21, 2014 at 8:45 AM, Marc Agbanch <[email protected]>wrote: > Thanks for your answer. > > Following yours advices, I build with -s ASSERTIONS=1. I also used -g4 for > the source map. The return error is "Error in loading dynamic library: > ReferenceError: __ZdlPv is not defined". Thanks to the source map, I know > that function is associated with the c++ operator delete in my side module. > The difference between my simple library which worked perfectly and that > one is the first one use only c code, and the second implement a use c++ > classes. It seems to me that dlopen() have some issues with c++ code. > I'll try to join the necessary about my code tomorrow. > > Le vendredi 16 mai 2014 02:07:09 UTC+2, Alon Zakai a écrit : >> >> If you build with -s ASSERTIONS=1 (on by default in -O0), you should >> see a message saying why it failed to evaluate that file. >> >> - Alon >> >> >> >> On Tue, May 13, 2014 at 6:24 AM, Marc Agbanch <[email protected]>wrote: >> >>> >>> Hi, >>> >>> >>> I succeeded in porting a C ++ project of mine to html with embedded JS >>> thanks to Emscripten. >>> >>> Now, I'm currently trying to use the dlopen support. I made a test >>> with a simple library and it ran perfectly. I made another test with a >>> bigger code and then, during the execution, the dlerror() folowing my >>> dlopen() returned the folowing message: >>> >>> >>> "Could not evaluate dynamic lib: /lib_note.js" >>> >>> >>> >>> I checked the compiling options (DLOPEN_SUPPORT, MAIN_MODULE, >>> SIDE_MODULE, EXPORTED_FUNCTIONS, --preload-file) ,my code, the wiki, but I >>> really don't have a clue about what could cause that error. Any idea ? >>> >>> -- >>> 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]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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]. > For more options, visit https://groups.google.com/d/optout. > -- 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]. For more options, visit https://groups.google.com/d/optout.
