Приложение Xcode4 отлично работает на iPhoneSimulator, но при сборке на устройстве произошла ошибка armv6 / 7 :( - PullRequest
2 голосов
/ 29 июля 2011

Я в растерянности на данный момент. :( Приложение отлично работает iPhoneSimulator. Но когда я пытаюсь собрать на устройстве (iphone4.3.1) (XCode4), Я получаю следующую ошибку:

Когда я выбираю Стандарт (armv6 armv7) для сборки:

    ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libz.1.2.3.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/DTMessageQueueing.framework/DTMessageQueueing, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/UIAutomation.framework/UIAutomation, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libSystem.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) for architecture armv6 

Когда я выбираю Оптимизированный (armv7) для сборки:

ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libz.1.2.3.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/DTMessageQueueing.framework/DTMessageQueueing, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/UIAutomation.framework/UIAutomation, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libSystem.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) for architecture armv7 
collect2: ld returned 1 exit status 
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 

Может ли кто-нибудь предоставить какие-либо указания о том, как решить эту проблему. Как я могу разрешить неподдерживаемый формат файла, который не является связываемой архитектурой (armv6) для ошибок архитектуры armv6. Любая помощь будет принята с благодарностью. Спасибо !!!

Ответы [ 2 ]

1 голос
/ 29 июля 2011

Удалите упомянутые библиотеки и заново добавьте их, используя кнопку «+» в разделе «Связать двоичные файлы с библиотеками» на вкладке «Фазы сборки» вашей цели.

0 голосов
/ 19 января 2012

Мне удалось решить аналогичную проблему, но проверьте / добавьте записи в сегмент «Путь поиска» раздела «Настройки сборки» для приложения.

Элемент Framework Search Paths содержит старые ссылки на 4.3 SDK пути, которые, вероятно, были правильными до того, как я обновлюсь до SDK 5.0.

Нужно это или нет, я добавил записи в разделе «Отладка для IOS Simulator 5.0» и «Любой IOS SDK», которые различают путь к каталогам iPhoneSimulator.Platform и iPhoneOS.Platform.

...