2010-10-01 24 views
0

J'essaie de créer une application iPhone en utilisant le framework OGRE, et j'obtiens une erreur de linker lors de la construction du simulateur que je ne sais pas comment résoudre . J'ai créé le projet Xcode en utilisant le modèle iPhone OGRE. J'utilise les bibliothèques statiques pour OGRE à partir du site Web principal, Ogre_iOS_4.0_Dependencies_20100623, et en essayant de construire pour le simulateur iOS 4.1. Je construis avec Xcode 3.2.4 sur Mac OS X 10.6.4.Erreur de lien lors de la compilation de l'application iPhone pour Simulator utilisant les bibliothèques OGRE

compilation semble fonctionner très bien, mais quand il arrive à l'étape de lien, je reçois les erreurs suivantes:

Ld build/Debug-iphonesimulator/OgreTestApp.app/OgreTestApp normal i386 
cd /Users/pauly/Projects/workspaces/games/OgreTestApp 
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.1.sdk -L/Users/pauly/Projects/workspaces/games/OgreTestApp/build/Debug-iphonesimulator -L/Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release -L/Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/iPhoneDependencies/lib/release -F/Users/pauly/Projects/workspaces/games/OgreTestApp/build/Debug-iphonesimulator -filelist /Users/pauly/Projects/workspaces/games/OgreTestApp/build/OgreTestApp.build/Debug-iphonesimulator/OgreTestApp.build/Objects-normal/i386/OgreTestApp.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -lboost_date_time -lboost_thread -lFreeImage -lFreeType -lOIS -lzzip -lOgreMainStatic -lRenderSystem_GLESStatic -lPlugin_BSPSceneManagerStatic -lPlugin_OctreeSceneManagerStatic -lPlugin_ParticleFXStatic -o /Users/pauly/Projects/workspaces/games/OgreTestApp/build/Debug-iphonesimulator/OgreTestApp.app/OgreTestApp 

ld: warning: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::allocate(unsigned long, void const*)has different visibility (default) in /Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release/libOIS.a(OISInputManager.o) and (hidden) in /Users/pauly/Projects/workspaces/games/OgreTestApp/build/OgreTestApp.build/Debug-iphonesimulator/OgreTestApp.build/Objects-normal/i386/OgreFramework.o 
ld: warning: std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_M_create_node(std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)has different visibility (default) in /Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release/libOIS.a(OISInputManager.o) and (hidden) in /Users/pauly/Projects/workspaces/games/OgreTestApp/build/OgreTestApp.build/Debug-iphonesimulator/OgreTestApp.build/Objects-normal/i386/OgreFramework.o 
ld: warning: std::char_traits<char>::eq(char const&, char const&)has different visibility (hidden) in /Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release/libFreeImage.a(IPTC.o) and (default) in /Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release/libOgreMainStatic.a(OgreString.o) 
ld: warning: std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)has different visibility (hidden) in /Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release/libFreeImage.a(IPTC.o) and (default) in /Users/pauly/Projects/sdk/Ogre/OgreSDK-iPhone/lib/release/libOgreMainStatic.a(OgreScriptCompiler.o) 
Undefined symbols: 
    ".objc_class_name_NSAutoreleasePool", referenced from: 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
    ".objc_class_name_UIApplication", referenced from: 
     [email protected][email protected][email protected] in libOIS.a(iPhoneInputManager.o) 
    ".objc_class_name_UIWindow", referenced from: 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
    ".objc_class_name_UIView", referenced from: 
     .objc_class_name_InputDelegate in libOIS.a(iPhoneInputManager.o) 
     .objc_class_name_EAGLView in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
    ".objc_class_name_UIAccelerometer", referenced from: 
     [email protected][email protected][email protected] in libOIS.a(iPhoneInputManager.o) 
     [email protected][email protected][email protected] in libOIS.a(iPhoneAccelerometer.o) 
    ".objc_class_name_CAEAGLLayer", referenced from: 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
    ".objc_class_name_EAGLContext", referenced from: 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLESContext.o) 
    ".objc_class_name_NSDictionary", referenced from: 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
    ".objc_class_name_NSNumber", referenced from: 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
    ".objc_class_name_UIScreen", referenced from: 
     [email protected][email protected][email protected] in libOIS.a(iPhoneInputManager.o) 
     [email protected][email protected][email protected] in libRenderSystem_GLESStatic.a(OgreEAGLSupport.o) 
     [email protected]__OBJC@[email protected] in libRenderSystem_GLESStatic.a(OgreEAGLWindow.o) 
ld: symbol(s) not found 
collect2: ld returned 1 exit status 

Comment puis-je résoudre ce problème? Merci.

Répondre

0

Vous avez probablement besoin de correctes dépendances Ogre précompilées pour la version correcte du SDK iOS (Masterfalcon publie régulièrement ces dépendances sur ogre3d.org). Erreurs d'éditeur similaires souvent provoquées par des iPhoneDependencies incorrectes (construites pour les iPhoneSKD plus anciens que vous possédez).

Il suffit de suivre les instructions indiquées ici: http://www.ogre3d.org/tikiwiki/Building+Ogre+with+CMake Siècle "Configuration pour iPhone". Tout devrait bien se passer.