Erstellen eines Ziel-C++ Static Library in Xcode

Also habe ich entwickelt, eine engine für das iPhone, mit dem würde ich gern ein paar verschiedene Spiele. Anstatt kopieren und einfügen die Dateien für die engine in jeder Spiel-Projekt, directory, würde ich eine Weise zu verknüpfen, um den Motor vor jedem Spiel, also wenn ich brauche, um eine Veränderung an, die ich nur so einmal. Nach reeding ein wenig herum, wie es scheint, statische Bibliotheken sind der beste Weg, dies zu tun auf dem iPhone.

Erstellte ich ein neues Projekt namens Skelett und kopiert alle meine engine-Dateien. Ich verwendet diese Anleitung zum erstellen einer statischen Bibliothek verwendet wird, und ich importierte die Bibliothek in ein Projekt namens Auswahl. Allerdings, wenn ich versuchte, das Projekt zu kompilieren, Xcode gestartet beschweren sich über einige C++ - Datenstrukturen, die ich in einer Datei namens ControlScene.mm. Hier ist mein build-Fehler:

  "operator delete(void*)", referenced from:


      -[ControlScene dealloc] in libSkeleton.a(ControlScene.o)


      -[ControlScene init] in libSkeleton.a(ControlScene.o)


      __gnu_cxx::new_allocator<operation_t>::deallocate(operation_t*, unsigned long)in libSkeleton.a(ControlScene.o)


      __gnu_cxx::new_allocator<operation_t*>::deallocate(operation_t**, unsigned long)in libSkeleton.a(ControlScene.o)


  "operator new(unsigned long)", referenced from:


      -[ControlScene init] in libSkeleton.a(ControlScene.o)


      __gnu_cxx::new_allocator<operation_t*>::allocate(unsigned long, void const*)in libSkeleton.a(ControlScene.o)


      __gnu_cxx::new_allocator<operation_t>::allocate(unsigned long, void const*)in libSkeleton.a(ControlScene.o)


  "std::__throw_bad_alloc()", referenced from:


      __gnu_cxx::new_allocator<operation_t*>::allocate(unsigned long, void const*)in libSkeleton.a(ControlScene.o)


      __gnu_cxx::new_allocator<operation_t>::allocate(unsigned long, void const*)in libSkeleton.a(ControlScene.o)


  "___cxa_rethrow", referenced from:


      std::_Deque_base<operation_t, std::allocator<operation_t> >::_M_create_nodes(operation_t**, operation_t**)in libSkeleton.a(ControlScene.o)


      std::_Deque_base<operation_t, std::allocator<operation_t> >::_M_initialize_map(unsigned long)in libSkeleton.a(ControlScene.o)


  "___cxa_end_catch", referenced from:


      std::_Deque_base<operation_t, std::allocator<operation_t> >::_M_create_nodes(operation_t**, operation_t**)in libSkeleton.a(ControlScene.o)


      std::_Deque_base<operation_t, std::allocator<operation_t> >::_M_initialize_map(unsigned long)in libSkeleton.a(ControlScene.o)


  "___gxx_personality_v0", referenced from:


      ___gxx_personality_v0$non_lazy_ptr in libSkeleton.a(ControlScene.o)


      ___gxx_personality_v0$non_lazy_ptr in libSkeleton.a(MenuLayer.o)


  "___cxa_begin_catch", referenced from:


      std::_Deque_base<operation_t, std::allocator<operation_t> >::_M_create_nodes(operation_t**, operation_t**)in libSkeleton.a(ControlScene.o)


      std::_Deque_base<operation_t, std::allocator<operation_t> >::_M_initialize_map(unsigned long)in libSkeleton.a(ControlScene.o)


ld: symbol(s) not found


collect2: ld returned 1 exit status

Könnte jemand einen Einblick, warum diese Probleme auftreten, würde ich es begrüßen.

InformationsquelleAutor LandonSchropp | 2010-05-17

Schreibe einen Kommentar