-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linking issue with BulletExample #2
Comments
Sorry, can't reproduce with GCC 4.7.3. The linking command is the following (I installed Magnum into
First four lines of
|
Yes, strangely enough, it seems that the symbols are defined for me as well:
I've tried to change the order of the lib in the compiler cmd line, without much success... Do you have a clue why the symbols were listed twice each in your case? |
Well, the only difference I see between your mangled symbols is This distinction between According to this spec, the distinction is:
Does it makes somehow sense to you? |
As far as I know, this has someting to do with template instantiation and weak symbols -- the template can be instantiated (and added to symbol table) more than once without error. I compiled Magnum with GCC 4.7, which added the symbols twice. Now I tried to build it with Clang and it has the symbol only once, just like in your case. I conclude that this is some weird compiler incompatibility -- try to build the examples with Clang too (or build Magnum with GCC 4.7). |
Well spotted! It indeed fixes the link error, and the demo runs fine! Is it something we should check & enforce (samples/bootstraps use the same compiler as the main lib)? it may not be a very common issue, though... |
Bullet example fail to link with the following error:
Compiler (GCC 4.7) was called like that:
Looks similar to
magnum-bootstrap
issue 3EDIT: the issue was that
libmagnum
was compiled withclang
with the sample was compiled withgcc
. Using the same compiler for both solved the issue.The text was updated successfully, but these errors were encountered: