2013-05-24 2 views
1

J'ai réussi à construire une librairie boost C++ 1_44_0 pour iPhone/iPad sur armv6 et armv7 mais je n'arrive pas à créer une build pour les nouveaux périphériques fonctionnant sur armv7s.Bibliothèque Complie Boost C++ pour appareils iOS fonctionnant sous armv7s

Utilisé BoostOnIphone et le codage A sur Github pour créer des builds, tout ce dont j'ai besoin est Boost: Thread, Filesystem et System Library sur l'architecture armv7s.

Sortie d'erreur:

ld: warning: ignoring file /Users/shams/Documents/Sources/Hawk.framework/Release-iphonesimulator/libhawk-engine.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Documents/Sources/Hawk.framework/Release-iphonesimulator/libhawk-engine.ald: warning: 
ld: warning: ignoring file /Users/shams/Documents/Sources/Hawk.framework/Release-iphoneos/libhawk-engine.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Documents/Sources/Hawk.framework/Release-iphoneos/libhawk-engine.ald: warning: ignoring file /Users/shams/Documents/Sources/boost.framework/Release-iphonesimulator/libboost_filesystem.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Documents/Sources/boost.framework/Release-iphonesimulator/libboost_filesystem.a 
ignoring file /Users/shams/Documents/Sources/boost.framework/Release-iphonesimulator/libboost_system.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Documents/Sources/boost.framework/Release-iphonesimulator/libboost_system.a 

ld: warning: 
ld: warning: ignoring file /Users/shams/Documents/Sources/boost.framework/Release-iphonesimulator/libboost_thread.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Documents/Sources/boost.framework/Release-iphonesimulator/libboost_thread.ald: warning: ignoring file /Users/shams/Downloads/boostoniphone-master/build/armv7/libboost_filesystem.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Downloads/boostoniphone-master/build/armv7/libboost_filesystem.a 

ignoring file /Users/shams/Downloads/boostoniphone-master/build/armv7/libboost_system.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Downloads/boostoniphone-master/build/armv7/libboost_system.a 
ld: warning: 

ignoring file /Users/shams/Downloads/boostoniphone-master/build/armv7/libboost_thread.a, file was built for archive which is not the architecture being linked (armv7s): /Users/shams/Downloads/boostoniphone-master/build/armv7/libboost_thread.a 
Undefined symbols for architecture armv7s: 
+0

Quels drapeaux de compilateur avez-vous utilisé pour construire pour armv7? Essayez de ne pas mettre de '-arch' - IIRC, cela a fonctionné pour moi. Erreur –

+0

venir dire qu'aucune architecture trouvée –

Répondre

0

Ma solution était de vérifier l'architecture de bibliothèque à l'aide du terminal:

otool -h libraryFile.a 

Sortie:

Mach header 
     magic cputype cpusubtype caps filetype ncmds sizeofcmds  flags 
0xfeedface  12   9 0x00   1  3  1588 0x00002000 

cputype et cpusubtype sont les valeurs de recherche :

pour ARMv7:

type cpu: 12 cpusubtype: 9

pour armv7s:

type cpu: 12 cpusubtype: 11

Maintenant, j'était dans une situation était il était impossible pour moi de mettre à jour l'architecture en tant que tierce partie. donc je fini par changer mon projet de construction Xcode:

  • réglage Xcode (onglet bleu) Projet
  • et l'architecture cible:
  • l'architecture valide ajoutée seulement ARMv7
  • build nettoyé et exécutez à nouveau

Une autre solution était d'utiliser Hacking an armv7s library en utilisant ce tutoriel. n'a pas fonctionné dans mon cas

Questions connexes