[osg-users] IOS and XCode 4

Thomas Hogarth thomas.hogarth at gmail.com
Fri Apr 1 16:22:59 PDT 2011


Hi all


Just wanted to share my experiences of IOS with XCode 4.0, I guess some of
this will be XCode 4.0 in General


I rather foolishly upgraded my IPod to IOS 4.3, when I next tried
to launch my app on it I was told XCode couldn't use the device anymore.


After downloading the 4.3 GB XCode 4.0 with the new IOS SDK (What?), I
installed, rebuilt OpenSceneGraph and my lib then tried to build and launch
my app. Only to be presented with the following link error.


ld: bad codegen, pointer diff in hogbox::Page::isSameKindAs(osg::Object
const*) constto global weak symbol typeinfo for osg::Objectfor architecture
armv7

collect2: ld returned 1 exit status

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
failed with exit code 1


Strange one ay, hogbox::Page just inherits from osg::Object and was fine
before.


It turned out there is a new setting in the target Build settings
called 'Symbols Hidden By Default', OSGs CMake system seems to set this to
NO. When I opened my actual app project which was XCode 3 it set this
setting to default YES. So then linking failed against OSG. Setting to NO as
it is for OSG fixed the issue.


I also had trouble locating my app bundle once built, check this out


http://forums.macrumors.com/showthread.php?t=1124465



My advise overall is be prepared to be frustrated if you upgrade to XCode
4.0, as they have decided to pretty much change every single aspect of it.
Took me 20 mins to even work out how to build in release :(. But on the plus
side the CMake system stil works with it and OSG is now tested and working
against IOS 4.3.


Cheers

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110402/72c59f28/attachment-0002.htm>


More information about the osg-users mailing list