First of all a preface - This problem was spotted while trying to
build a large C++ project which links a close to 100 of object file
together, plus libraries. I can't replicate this behavior in a simple
isolated test. Just want to understand if potentially this may be
caused by clang's compiler or
Richard,
Thanks for the quick response; it gave me some directions to
investigate further, otherwise it seemed I got stuck trying to make
sense of many moving pieces in this puzzle. So, my understanding is
that generally the run-time exception handling should _not_ depend on
the order of the link
> Can you catch the exception with "catch (...)"?
I tried this route and added such catch-all clause just at the throw
site. Moreover, I put an explicit throw("catch-me") there in hope to
see if it wil just get caught rightaway. Nope, the exception is thrown
properly, but the catch (...) is not in
> $ clang++ -o test main.cpp template.cpp
>
>> /usr/bin/ld: /tmp/main-e2fa2c.o: in function `main':
> main.cpp:(.text+0x2f): undefined reference to `Template::Template()'
> /usr/bin/ld: main.cpp:(.text+0x4d): undefined reference to
> `Template::~Template()'
> /usr/bin/ld: main.cpp:(.text+0x82): und