[osg-users] IOS and XCode 4

Eduardo Poyart poyart at gmail.com
Wed Apr 6 21:45:10 PDT 2011


Hello,

Here's another useful information about the Symbols Hidden By Default
problem.

I have a Mac OS X application (not iOS). It built and ran ok on Xcode 4 in
Debug mode. In Release mode, it wasn't receiving any mouse clicks or
keyboard input.

After a couple of hours of tracking down, I was able to make it work by
setting "Symbols Hidden By Default" to No.

When I had the problem occurring (with "Symbols..." set to Yes), I noticed
by stepping through the code that the event made it as far as this line in
EventQueue:

   void mouseButtonPress(float x, float y, unsigned int button) {
mouseButtonPress(x, y, button, getTime()); }


But the code flow didn't enter the mouseButtonPress 4-argument function. It
just returned from there.

I assume that symbol was hidden... ;)

Thinking about what would be a definitive fix for this problem... would it
help if Cmake makes OSG compile with "Symbols Hidden By Default = Yes" for
Release?

Xcode projects, by default, have this option set to No for debug and Yes for
release.

Other than the problem I described, the transition to Xcode 4 was quite
painless.

Cheers
Eduardo


On Fri, Apr 1, 2011 at 4:22 PM, Thomas Hogarth <thomas.hogarth at gmail.com>wrote:

> 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
>
>
>
>
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110406/bc24a85c/attachment-0004.htm>


More information about the osg-users mailing list