开发者

XCode error after linking SQLite3

开发者 https://www.devze.com 2023-03-20 06:21 出处:网络
I get the following error after adding libsqlite3.dylib to my xcode frameworks folder. ignoring file /Users/AlexStein/Desktop/iPhone Applications/Persistence copy/libsqlite3.dylib, missing required a

I get the following error after adding libsqlite3.dylib to my xcode frameworks folder.

ignoring file /Users/AlexStein/Desktop/iPhone Applications/Persistence copy/libsqlite3.dylib, missing required architecture i386 in file

The way I added sqlite3 was as follows: Right clicked on frameworks folder, selected "Add files to..." and search开发者_开发知识库ed for libsqlite3.dylib. There were two of those and two of libsqlite3.0.dylib. I knew the "3.0" wasn't right for the simulator, so I chose one of the "3"s. When I try to chose the other one it simply says that I have already added it, so I assume they are the same.

I'm not sure why I'm getting the error as I'm pretty sure all my code is right. This is something to do with xCode. I'd appreciate any help!


have you checked project setting. architecture column .

EDITED

Apple’s Xcode 4 is different from its earlier version. We have to learn a new user interface and must workaround some birth defects. Try out these steps:

  • Navigate to Build Settings tab and check out the Architectures group

  • Look at the values, for example Architectures: Standard (armv6 armv7), Base SDK: Latest iOS (iOS 4.3), Build Active Architecture Only: No, Supported Platforms: iphonesimulator, iphoneos and Valid Architectures: armv6 armv7 i386.

  • If “Valid Architectures” is set only to armv6 and armv7, delete both. Restart Xcode. I do not know why but some of you reported that it helped. Set “Valid Architectures” to $(ARCHS_STANDARD_32_BIT). Valid Architectures will show armv6 and armv7 again but this time it may compile just fine. Strange though.

  • Besides standard armv6 and armv7, manually add i386 to “Valid Architectures”. Note that i386 is a valid architecture since the Simulator is running on your Intel iMac (or MacBook Pro).

Notes:

  • Change your code to reduce the number of warnings like this: 1 2 3 4

replace: if (self = [super init]) { with: if ((self = [super init])) {

  • armv6 notices: Apple initiated a major hardware cutoff with iOS 4.3. iOS 4.3 removed support for any of the armv6 based gadgets. Old iPod touch/iPhone (1G, 2G, 3G) devices are all running on arm v6 CPU. Armv6 compilers does not work with armv7 or above, but with Xcode 4 you can build apps for old devices running iOS 4.2 or earlier. In your code look for iOS and hardware versions to use the proper framework or other objects otherwise you get exceptions at runtime. It seems Apple prepares the road for armv8 devices and iOS 5.
0

精彩评论

暂无评论...
验证码 换一张
取 消