Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

xcode - linking against dylib built for MacOSX file '/usr/lib/libSystem.B.dylib' for architecture i386

I recently switched my development MacBook from a classic MacBook (32 bit) to a MacBook Air (64 bit). I am trying to open a project that was made on my old MacBook (32 bit) running XCode 4.

The project is a PhoneGap application made in PhoneGap 1.7.0.

My new MacBook Air (64 bit) is running XCode 5.

I imported my developer profiles from my old MacBook to my new MacBook Air. But when I try to run it, I get the following error message.

enter image description here

enter image description here

I have tried changing the my architecture in the build settings to armv7 but still no luck :(

Does anyone know why I'm getting this error and how to fix it?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

OK so as it turns out, XCode 5 changes the default architecture to armv7 when my application does not support armv7. I am running Cordova 1.7.0 and that version does not have support for armv7 architecture.

Fix architecture issue:

  1. Removed ALL architectures from Build Settings --> Valid Architecture
  2. Added armv6 to Build Settings --> Valid Architecture enter image description here


Fix libSystem.B.dylib issue:

  1. Removed /usr/lib/libSystem.B.dylib from Build Settings --> Linking --> Other Linker Flags

  2. Also removed -weak_library from Build Settings --> Linking --> Other Linker Flags enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...