As the message says, the issue arises when you have identical basenames in a .a file (because .a files only store a basename). Instead of archiving
dir1/name.o dir2/name.o you can rename one of those "name"s. Or, avoid .a files. Linking .o files into bigger .o files (or .so, or .bc, all the same) works fine, emcc will call llvm-link for you. On Mon, Aug 31, 2015 at 7:26 AM, Robert Goulet <[email protected]> wrote: > When building a rather large project, I get this warning: > > WARNING root: loading from archive > D:\dev\project\source\develop\build\engine\webgl\lib\libfoundation.a, which > has duplicate entries (files with identical base names). this is dangerous > as only the last will be taken into account, and you may see surprising > undefined symbols later. you should rename source files to avoid this > problem (or avoid .a archives, and just link bitcode together to form > libraries for later linking) > > That one seems a bit odd to me and worries me. How do we fix this if we > use CMake to build our project using the Emscripten toolchain file > provided? Does this means we can generate other file formats that are not > archive libraries (.a) but are used for the same purpose? > > Thanks! > > -- > 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.
