سؤال

i woke up this morning and my file "libz.dylib" was red and i was unable to complile my project. So i try to re-install Xcode 4.3 and i was able to import the library again.

Then when i try to run on device the compiler give to me this 4 waring and this error :

ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/lib/crt1.3.1.o, file was built for i386 which is not the architecture being linked (armv7)
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/lib/libsqlite3.0.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/iPhoneSimulator5.0.sdk/usr/lib/libz.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/iPhoneSimulator5.0.sdk/usr/lib/libstdc++.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/iPhoneSimulator5.0.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/iPhoneSimulator5.0.sdk/usr/lib/libobjc.A.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

i can run my app on the simulator but i'm not able to compile on the DEVICE.

i think the problem is with a library link. Did somebody had the same problem before?

Tnx

هل كانت مفيدة؟

المحلول

I had a similar problem just now and compared my build settings to a project (imported from an earlier version of xcode) that was working. I noticed the working project had nothing set in 'Other Linker Flags' whereas my not-working project had '-arch i386' set in it. I removed that and it seems to have fixed it. I don't really know why though.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top