template building errors with 1.8 xcode 4

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

template building errors with 1.8 xcode 4

Post by dowi »

hi

this is what i've done:

i downloaded 1.8 from Mercurial.
i followed the guide for building the source for iphone
downloaded the template for xcode 4

i get now 6 errors that says:

Code: Select all

Undefined symbols for architecture i386:
  "_CGDataProviderCreateWithData", referenced from:
      Ogre::EAGLWindow::copyContentsToMemory(Ogre::PixelBox const&, Ogre::RenderTarget::FrameBuffer) in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGColorSpaceCreateDeviceRGB", referenced from:
      Ogre::EAGLWindow::copyContentsToMemory(Ogre::PixelBox const&, Ogre::RenderTarget::FrameBuffer) in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGImageCreate", referenced from:
      Ogre::EAGLWindow::copyContentsToMemory(Ogre::PixelBox const&, Ogre::RenderTarget::FrameBuffer) in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGContextDrawImage", referenced from:
      Ogre::EAGLWindow::copyContentsToMemory(Ogre::PixelBox const&, Ogre::RenderTarget::FrameBuffer) in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGBitmapContextGetData", referenced from:
      Ogre::EAGLWindow::copyContentsToMemory(Ogre::PixelBox const&, Ogre::RenderTarget::FrameBuffer) in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGImageRelease", referenced from:
      Ogre::EAGLWindow::copyContentsToMemory(Ogre::PixelBox const&, Ogre::RenderTarget::FrameBuffer) in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
now, shouldn't it be armv6 instead of i386?

the only thread related i found was this:
http://www.ogre3d.org/forums/viewtopic.php?f=21&t=63831
but it didnt help to add the zlib

anyone can help?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: template building errors with 1.8 xcode 4

Post by masterfalcon »

Are you building for the simulator by any chance?
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

Re: template building errors with 1.8 xcode 4

Post by dowi »

yeah, isnt it suppose to work?

after the dource build i have 3 lib folders:
Release
Release-iphoneos
Release-iphonesimulator


i tried changing the lib search path but no luck : - \
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

Re: template building errors with 1.8 xcode 4

Post by dowi »

ok i'v built for device and now i get this errors (same except arvm6)

Code: Select all

Undefined symbols for architecture armv6:
  "_CGImageCreate", referenced from:
      __ZN4Ogre10EAGLWindow20copyContentsToMemoryERKNS_8PixelBoxENS_12RenderTarget11FrameBufferE in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGColorSpaceCreateDeviceRGB", referenced from:
      __ZN4Ogre10EAGLWindow20copyContentsToMemoryERKNS_8PixelBoxENS_12RenderTarget11FrameBufferE in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGImageRelease", referenced from:
      __ZN4Ogre10EAGLWindow20copyContentsToMemoryERKNS_8PixelBoxENS_12RenderTarget11FrameBufferE in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGDataProviderCreateWithData", referenced from:
      __ZN4Ogre10EAGLWindow20copyContentsToMemoryERKNS_8PixelBoxENS_12RenderTarget11FrameBufferE in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGBitmapContextGetData", referenced from:
      __ZN4Ogre10EAGLWindow20copyContentsToMemoryERKNS_8PixelBoxENS_12RenderTarget11FrameBufferE in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
  "_CGContextDrawImage", referenced from:
      __ZN4Ogre10EAGLWindow20copyContentsToMemoryERKNS_8PixelBoxENS_12RenderTarget11FrameBufferE in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o)
ld: symbol(s) not found for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
how can i solve this linking problems?!


thanks alot
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: template building errors with 1.8 xcode 4

Post by masterfalcon »

Could you give me the full link command from the log?
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

Re: template building errors with 1.8 xcode 4

Post by dowi »

hi masterfalcon
i hope this is what you ment :

Code: Select all

Ld /Users/dovi/Library/Developer/Xcode/DerivedData/OgreTemplate_xcode4-dtphvtonfdahpecwjfkdaghhlfqe/Build/Intermediates/OgreTemplate_xcode4.build/Debug-iphoneos/OgreTemplate_xcode4.build/Objects-normal/armv7/OgreTemplate_xcode4 normal armv7
    cd /Users/dovi/Documents/OgreTemplate_xcode4
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/dovi/Library/Developer/Xcode/DerivedData/OgreTemplate_xcode4-dtphvtonfdahpecwjfkdaghhlfqe/Build/Products/Debug-iphoneos -L/Users/dovi/OgreMain/sources/1.8/build/iOS/lib/Release -L/Users/dovi/OgreMain/sources/1.8/build/iOS/iPhoneDependencies/lib/release -L/Users/dovi/OgreMain/sources/1.8/build/iOS/iPhoneDependencies/lib -L/Users/dovi/Documents/OgreTemplate_xcode4 -F/Users/dovi/Library/Developer/Xcode/DerivedData/OgreTemplate_xcode4-dtphvtonfdahpecwjfkdaghhlfqe/Build/Products/Debug-iphoneos -F/Users/dovi/OgreMain/sources/1.8/build/iOS/lib/Release -F/Users/dovi/OgreMain/sources/1.8/build/iOS/iPhoneDependencies/lib/release -F/Users/dovi/OgreMain/sources/1.8/build/iOS/iPhoneDependencies/lib -filelist /Users/dovi/Library/Developer/Xcode/DerivedData/OgreTemplate_xcode4-dtphvtonfdahpecwjfkdaghhlfqe/Build/Intermediates/OgreTemplate_xcode4.build/Debug-iphoneos/OgreTemplate_xcode4.build/Objects-normal/armv7/OgreTemplate_xcode4.LinkFileList -dead_strip -lOIS -lOgreMainStatic -lRenderSystem_GLESStatic -lboost_thread -lFreeType -lFreeImage -lzzip -lz -miphoneos-version-min=4.3 -lRenderSystem_GLESStatic -lz -lFreeImage -lFreeType -lOIS -lzzip -lboost_thread -lOgreMainStatic -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -o /Users/dovi/Library/Developer/Xcode/DerivedData/OgreTemplate_xcode4-dtphvtonfdahpecwjfkdaghhlfqe/Build/Intermediates/OgreTemplate_xcode4.build/Debug-iphoneos/OgreTemplate_xcode4.build/Objects-normal/armv7/OgreTemplate_xcode4
thanks alot for all the help
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: template building errors with 1.8 xcode 4

Post by masterfalcon »

Try adding the CoreGraphics framework in there too. I'll need to update the templates to account for that changes in copyContentsToMemory.
dowi
Halfling
Posts: 48
Joined: Wed Sep 07, 2011 3:37 am

Re: template building errors with 1.8 xcode 4

Post by dowi »

hi!!!

it's working now! build successfully for device and simulator! :D

had to add coreGraphics.framework
/*edit->*/ you precedded me : )
and the linking problems are gone!


thanks alot for the help!

also i'd like it if you explain a bit on what you wanted to learn from the link command so i can learn : )

now on to trying putting ogre in uiview... probably will need some help there to... :wink:
thanks