I am creating an app that do login using facebook.I am using facebook SDK 3.1 but it shows me error , i have added facebook.framwork and resourcefole to my project but still it shows error.
Here is the error report.
Undefined symbols for architecture i386:
"_sqlite3_open_v2", referenced from:
___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)
"_sqlite3_exec", referenced from:
___36-[FBCacheIndex initWithCacheFolder:]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)
"_sqlite3_close", referenced from:
___23-[FBCacheIndex dealloc]_block_invoke_0 in FacebookSDK(FBCacheIndex.o)
"_sqlite3_finalize", referenced from:
_releaseStatement in FacebookSDK(FBCacheIndex.o)
"_sqlite3_errmsg", referenced from:
_releaseStatement in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
_initializeStatement in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
...
"_sqlite3_bind_text", referenced from:
-[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
"_sqlite3_bind_double", referenced from:
-[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
"_sqlite3_bind_int", referenced from:
-[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
"_sqlite3_step", referenced from:
-[FBCacheIndex _updateEntryInDatabaseForKey:entry:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _writeEntryInDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _removeEntryFromDatabaseForKey:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _dropTrimmingTable] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
...
"_sqlite3_prepare_v2", referenced from:
_initializeStatement in FacebookSDK(FBCacheIndex.o)
"_sqlite3_reset", referenced from:
_initializeStatement in FacebookSDK(FBCacheIndex.o)
"_sqlite3_column_text", referenced from:
-[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
"_sqlite3_column_double", referenced from:
-[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
"_sqlite3_column_int", referenced from:
-[FBCacheIndex _readEntryFromDatabase:] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _fetchCurrentDiskUsage] in FacebookSDK(FBCacheIndex.o)
-[FBCacheIndex _trimDatabase] in FacebookSDK(FBCacheIndex.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You get endefined symbols error due to sqlite3.
In other linker flags in Build Settings of XCode project make sure you set the flag -lsqlite3.0.Make sure you set it beside adding frameworks Accounts,AdSupport,Social.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.