Hi,

I have the same problem when trying to compile the iPhone-example with the 
latest osg trunk version, iOS-SDK 5.0 and Xcode4.


Code:

Ld build/bin/osgViewerIPhone.app/osgViewerIPhone normal i386
    cd /projects/osg
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH 
"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ 
-arch i386 -isysroot 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
 -L/projects/osg/build/bin -F/projects/osg/build/bin -filelist 
/projects/osg/build/examples/osgviewerIPhone/OpenSceneGraph.build/Release-iphonesimulator/example_osgViewerIPhone.build/Objects-normal/i386/osgViewerIPhone.LinkFileList
 -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework 
QuartzCore -framework Foundation -framework OpenGLES -framework UIKit 
-Wl,-search_paths_first -Wl,-headerpad_max_install_names 
/projects/osg/build/lib/libOpenThreads.a /projects/osg/build/lib/libosg.a 
/projects/osg/build/lib/libosgDB.a /projects/osg/build/lib/libosgUtil.a 
/projects/osg/build/lib/libosgGA.a /projects/osg/build/lib/libosgViewer.a 
/projects/osg/build/lib/libosgText.a /projects/osg/build/lib/libosgdb_osg.a 
/projects/osg/build/lib/libosgdb_freetype.a /projects/osg/build/lib/libosgdb_ima
 geio.a /projects/osg/build/lib/libosgGA.a /projects/osg/build/lib/libosgText.a 
/projects/of/libs/freetype/lib/iphone/freetype.a 
/projects/osg/build/lib/libosgDB.a /usr/lib/libz.dylib 
/projects/osg/build/lib/libosgUtil.a /projects/osg/build/lib/libosg.a 
/projects/osg/build/lib/libOpenThreads.a -lpthread /usr/lib/libm.dylib 
/usr/lib/libdl.dylib -framework CoreGraphics -framework Accelerate -Xlinker 
-no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -o 
/projects/osg/build/bin/osgViewerIPhone.app/osgViewerIPhone

Undefined symbols for architecture i386:
  "_CGImageSourceCreateWithDataProvider", referenced from:
      CreateCGImageFromDataStream(std::istream&) in 
libosgdb_imageio.a(ReaderWriterImageIO_IOS.o)
      ReaderWriterImageIO::readImageStream(std::istream&) const in 
libosgdb_imageio.a(ReaderWriterImageIO_IOS.o)
  "_CGImageSourceCreateImageAtIndex", referenced from:
      CreateCGImageFromDataStream(std::istream&) in 
libosgdb_imageio.a(ReaderWriterImageIO_IOS.o)
      ReaderWriterImageIO::readImageStream(std::istream&) const in 
libosgdb_imageio.a(ReaderWriterImageIO_IOS.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)




Having followed the instructions in the readme.txt, building OSG against iOS 
5.0 works fine, but building the example fails with the described linker error. 
I think the "CG" in the function names means "CoreGraphics", which is a 
framework bundled with the iOS-SDK. Adding "-framework CoreGraphics" to the 
Linker options doesn't solve the problem, though...

How else can I resolve this linker error? Any suggestions?

Thanks,
Christoph

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44894#44894





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to