i use xcode with libsqlite3.dylib for sqlite , but when i compile to device the following error arise :
Ld /Users/user1319/Library/Developer/Xcode/DerivedData/Directory-app normal armv7
cd /Users/user1319/Desktop/app/app
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
setenv PATH "/Developer/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Developer/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/user1319/Library/Developer/Xcode/DerivedData/app_Directory-bnkhohrmxdhrusarswxeqvxlljct/Build/Products/Distribution-iphoneos -F/Users/user1319/Library/Developer/Xcode/DerivedData/app-bnkhohrmxdhrusarswxeqvxlljct/Build/Products/Distribution-iphoneos -filelist "/Users/user1319/Library/Developer/Xcode/DerivedData/app-bnkhohrmxdhrusarswxeqvxlljct/Build/Intermediates/app Directory.build/Distribution-iphoneos/app.build/Objects-normal/armv7/app.LinkFileList" -Xlinker -rpath -Xlinker / -dead_strip -miphoneos-version-min=5.0 -lsqlite3 -lsqlite3.0 -framework AddressBook -framework AddressBookUI -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/user1319/Library/Developer/Xcode/DerivedData/app-bnkhohrmxdhrusarswxeqvxlljct/Build/Products/Distribution-iphoneos/app.app/app
ld: warning: ignoring file /Developer/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/libsqlite3.dylib, missing required architecture armv7 in file
ld: warning: ignoring file /Developer/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/libsqlite3.0.dylib, missing required architecture armv7 in file
Undefined symbols for architecture armv7:
"_sqlite3_reset", referenced from:
-[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMStatement reset] in FMDatabase.o
-[FMResultSet next] in FMResultSet.o
"_sqlite3_bind_blob", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_changes", referenced from:
-[FMDatabase changes] in FMDatabase.o
"_sqlite3_prepare_v2", referenced from:
-[FMDatabase executeQuery:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMDatabase(FMDatabaseAdditions) validateSQL:error:] in FMDatabaseAdditions.o
"_sqlite3_open", referenced from:
-[FMDatabase open] in FMDatabase.o
"_sqlite3_open_v2", referenced from:
-[FMDatabase openWithFlags:] in FMDatabase.o
"_sqlite3_bind_text", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_step", referenced from:
-[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMResultSet next] in FMResultSet.o
"_sqlite3_next_stmt", referenced from:
-[FMDatabase close] in FMDatabase.o
"_sqlite3_bind_double", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_threadsafe", referenced from:
+[FMDatabase isThreadSafe] in FMDatabase.o
"_sqlite3_bind_int", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_last_insert_rowid", referenced from:
-[FMDatabase lastInsertRowId] in FMDatabase.o
"_sqlite3_column_blob", referenced from:
-[FMResultSet dataForColumnIndex:] in FMResultSet.o
-[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
"_sqlite3_finalize", referenced from:
-[FMDatabase close] in FMDatabase.o
-[FMDatabase executeQuery:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMStatement close] in FMDatabase.o
-[FMDatabase(FMDatabaseAdditions) validateSQL:error:] in FMDatabaseAdditions.o
"_sqlite3_column_text", referenced from:
-[FMResultSet kvcMagic:] in FMResultSet.o
-[FMResultSet stringForColumnIndex:] in FMResultSet.o
-[FMResultSet UTF8StringForColumnIndex:] in FMResultSet.o
"_sqlite3_column_bytes", referenced from:
-[FMResultSet dataForColumnIndex:] in FMResultSet.o
-[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
"_sqlite3_column_int64", referenced from:
-[FMResultSet longForColumnIndex:] in FMResultSet.o
-[FMResultSet longLongIntForColumnIndex:] in FMResultSet.o
"_sqlite3_bind_parameter_count", referenced from:
-[FMDatabase executeQuery:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:] in FMDatabase.o
"_sqlite3_column_count", referenced from:
-[FMResultSet columnCount] in FMResultSet.o
-[FMResultSet setupColumnNames] in FMResultSet.o
-[FMResultSet kvcMagic:] in FMResultSet.o
"_sqlite3_column_name", referenced from:
-[FMResultSet setupColumnNames] in FMResultSet.o
-[FMResultSet kvcMagic:] in FMResultSet.o
-[FMResultSet columnNameForIndex:] in FMResultSet.o
"_sqlite3_errmsg", referenced from:
-[FMDatabase lastErrorMessage] in FMDatabase.o
-[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:] in FMDatabase.o
-[FMResultSet next] in FMResultSet.o
"_sqlite3_column_type", referenced from:
-[FMResultSet stringForColumnIndex:] in FMResultSet.o
-[FMResultSet dateForColumnIndex:] in FMResultSet.o
-[FMResultSet dataForColumnIndex:] in FMResultSet.o
-[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o
-[FMResultSet columnIndexIsNull:] in FMResultSet.o
-[FMResultSet UTF8StringForColumnIndex:] in FMResultSet.o
-[FMResultSet objectForColumnIndex:] in FMResultSet.o
...
"_sqlite3_libversion", referenced from:
+[FMDatabase sqliteLibVersion] in FMDatabase.o
"_sqlite3_errcode", referenced from:
-[FMDatabase lastErrorCode] in FMDatabase.o
-[FMResultSet hasAnotherRow] in FMResultSet.o
"_sqlite3_column_int", referenced from:
-[FMResultSet intForColumnIndex:] in FMResultSet.o
"_sqlite3_close", referenced from:
-[FMDatabase close] in FMDatabase.o
"_sqlite3_column_double", referenced from:
-[FMResultSet doubleForColumnIndex:] in FMResultSet.o
"_sqlite3_data_count", referenced from:
-[FMResultSet resultDict] in FMResultSet.o
"_sqlite3_bind_int64", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
"_sqlite3_bind_null", referenced from:
-[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
But the project compiled successfully to simulator , the error happen when i compiled the project to real device .
Look if libsqlite3.dylib is added to all your targets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With