Apr 11 2011

Xcode4 bad codegen, pointer diff

We recently upgraded to Xcode 4 and we found a lot of our static libraries no longer built due to a change Apple made with symbol visibility settings.

The errors crop up something like this:

ld: bad codegen, pointer diff in b2ContactListener::b2ContactListener()to global weak symbol vtable for b2ContactListener

The fix we found was to modify the build settings for every static library, as well as the App to:

Symbols Hidden By Default = YES
Inline Methods Hidden = NO

Hopefully this helps someone else out with the same problem!


Leave a Reply