I thought I would add that... ...putting libfoo.a on the command line, instead of -lfoo, makes the unresolved symbol go away, btw.
bram On Monday, December 23, 2013 3:38:23 PM UTC-8, Bram Stolk wrote: > > emHello, > > I found that emscripten comes with an archiver tool, called emar. > During final stage when I create my .js code, pulling in an archive with > '-l' does not seem to work for me. > The symbols that reside in the archive are not found. > > This is what I do: > With em++ -c I create .o files containing byte code. > With emar I combine .o bytecode files into an archive libfoo.a > Then I build my js with em++ main.cpp -lfoo > -> symbol not found. > > If, for the last step, I remove the -lfoo, and supply the .o files > directly on the command line, the .js code is successfully generated. > > So in short: combining objects into an archive works fine when building > native binary from source. > But it fails when building javascript using emscripten compiler. > > Did anyone else hit this same issue? > Any idea why this is? > > Thanks, > > Bram > > -- 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/groups/opt_out.
