Yes, something is indeed broken. Please see the issue I linked for the details - emscripten uses llvm-ar, which does not provide a way to handle this case (in fact, it did, but it was removed...). We looked for a solution in the issue, but can't find a workaround except to write an implementation of ar ourselves, which no one seems interested to do, I suppose since the workaround tends to be simple. If you have new ideas on how to solve this, please comment in the issue, it would be great to have this fixed.
- Alon On Fri, Feb 20, 2015 at 9:13 PM, Andrew S. <andrew.shaito...@gmail.com> wrote: > Hi Alon! > > I think something was broken since 1.27.0, also everything links fine > under PNaCl, OSX, Linux LLVM, Linux GCC toolchains. I don't know how > actually ar handles this, but I believe something is wrong with emscripten > ar. > > Andrew. > > суббота, 21 февраля 2015 г., 0:26:47 UTC+3 пользователь Alon Zakai написал: >> >> This looks like https://github.com/kripken/emscripten/issues/2619 , >> specifically having identical basenames in a single .a file. On incoming we >> should show a warning on that, but not yet I guess on the version you are >> using. The workaround is to rename one of the files, or not use .a files >> and use the simpler .o/.a/.so libraries. >> >> - Alon >> >> On Wed, Feb 18, 2015 at 9:39 PM, Andrew S. <andrew.s...@gmail.com> wrote: >> >>> Hi everyone! >>> >>> Could please anyone help me with the problem below? >>> >>> To reproduce bug you need to create 3 files: >>> >>> 1) Main.cpp >>> >>> extern void Func1(); >>> >>> extern void Func2(); >>> >>> int main() >>> { >>> Func1(); >>> >>> Func2(); >>> >>> return 0; >>> } >>> >>> 2) File.cpp >>> >>> #include <stdio.h> >>> >>> void Func2() >>> { >>> printf("Func2\n"); >>> } >>> >>> 3) Dir/File.cpp >>> >>> >>> #include <stdio.h> >>> >>> void Func1() >>> { >>> printf("Func1\n"); >>> } >>> >>> And then compile & link them: >>> >>> em++ -c File.cpp -o File.o >>> em++ -c Dir/File.cpp -o Dir/File.o >>> em++ rc libLib.a File.o Dir/File.o >>> em++ Main.cpp libLib.a -o application.html >>> >>> You will get the following error: >>> >>> warning: unresolved symbol: _Z5Func2v >>> >>> >>> Thanks, >>> Andrew. >>> >>> >>> Hi! >>>> >>>> Could anyone look into this issue https://github.com/kripken/ems >>>> cripten/issues/3168? >>>> >>>> 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 emscripten-discuss+unsubscr...@googlegroups.com. >>> 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 emscripten-discuss+unsubscr...@googlegroups.com. > 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.