Hi guys,
I'm trying run an OSG example on the iPhone simulator. First of all I
downloaded the new Release 3.0.1. Then I run this cmake command:
ccmake -G Xcode \
-DOSG_BUILD_PLATFORM_IPHONE_SIMULATOR:BOOL=ON \
-DBUILD_OSG_APPLICATIONS:BOOL=OFF \
-DCMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
\
-DBUILD_OSG_EXAMPLES:BOOL=ON \
-DOSG_BUILD_FRAMEWORKS:BOOL=OFF \
-DOSG_WINDOWING_SYSTEM:STRING=IOS \
-DCMAKE_OSX_ARCHITECTURES:STRING=i386 \
-DOSG_GL1_AVAILABLE:BOOL=OFF \
-DOSG_GL2_AVAILABLE:BOOL=OFF \
-DOSG_GLES1_AVAILABLE:BOOL=ON \
-DOSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-DOSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-DOSG_GL_LIBRARY_STATIC:BOOL=OFF \
-DOSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-DOSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-DDYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-DDYNAMIC_OPENTHREADS:BOOL=OFF \ ..
Then I open the project-file. After that I have to change the base SDK to 4.3
because the sdk is set to 3.2.
Then I try to run the target example_osgVieweriPhone.
The building works but i get a weird linker error:
Ld build-iOS/bin/osgViewerIPhoned.app/osgViewerIPhoned normal i386
cd /Users/Kun/OpenSceneGraph-3.0.1
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/g++-4.2
-arch i386 -isysroot
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk
-L/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/bin
-F/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/bin -filelist
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/examples/osgviewerIPhone/OpenSceneGraph.build/Debug-iphonesimulator/example_osgViewerIPhone.build/Objects-normal/i386/osgViewerIPhoned.LinkFileList
-mmacosx-version-min=10.6 -framework QuartzCore -framework Foundation
-framework OpenGLES -framework UIKit -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libOpenThreadsd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgDBd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgUtild.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgGAd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgV
iewerd.a /Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgTextd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgdb_osgd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgdb_freetyped.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgdb_imageiod.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgGAd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgTextd.a
/usr/X11R6/lib/libfreetype.dylib
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgDBd.a /usr/lib/libz.dylib
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgUtild.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libosgd.a
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/lib/libOpenThreadsd.a
/usr/lib/libm.dylib /usr/lib/libdl.dylib -framework Accelerate -Xlinker
-objc_abi_version -Xlinker 2 -o
/Users/Kun/OpenSceneGraph-3.0.1/build-iOS/bin/osgViewerIPhoned.app/osgViewerIPhoned
Undefined symbols for architecture i386:
"_CGImageGetWidth", referenced from:
CreateOSGImageFromCGImage(CGImage*) in
libosgdb_imageiod.a(ReaderWriterImageIO_IOS.o)
ReadCoreGraphicsImageFromFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)in
libosgdb_imageiod.a(ReaderWriterImageIO_IOS.o)
"_CGImageGetHeight", referenced from:
CreateOSGImageFromCGImage(CGImage*) in
libosgdb_imageiod.a(ReaderWriterImageIO_IOS.o)
ReadCoreGraphicsImageFromFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)in
libosgdb_imageiod.a(ReaderWriterImageIO_IOS.o)
Have anyone a solution?
Thank you!
Cheers,
Tobi
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42431#42431
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org