PruitIgoe
PruitIgoe

Reputation: 6384

iOS SQLite Mach-O errors on simulator, not iPhone (4)

I'm getting a bunch of Linker errors when trying to compile my app in the simulator, but none when compiling it to my phone. Could someone take a look at them and take a guess as to what is going on?

I have libsqlite3.dylib in my app.

ld: warning: ignoring file /Users/monkeyButt/Desktop/Development/XCodeApps/knowInk Publishing - Medicare Providers Locator/libsqlite3.dylib, missing required architecture i386 in file Undefined symbols for architecture i386: "_sqlite3_open", referenced from: -[SQLiteController initSQLiteDB] in SQLiteController.o -[SQLiteController getData] in SQLiteController.o "_sqlite3_exec", referenced from: -[SQLiteController initSQLiteDB] in SQLiteController.o -[SQLiteController insertData:::] in SQLiteController.o "_sqlite3_close", referenced from: -[SQLiteController initSQLiteDB] in SQLiteController.o -[SQLiteController getData] in SQLiteController.o "_sqlite3_last_insert_rowid", referenced from: -[SQLiteController insertData:::] in SQLiteController.o "_sqlite3_errmsg", referenced from: -[SQLiteController insertData:::] in SQLiteController.o "_sqlite3_prepare_v2", referenced from: -[SQLiteController getData] in SQLiteController.o "_sqlite3_step", referenced from: -[SQLiteController getData] in SQLiteController.o "_sqlite3_column_int", referenced from: -[SQLiteController getData] in SQLiteController.o "_sqlite3_column_text", referenced from: -[SQLiteController getData] in SQLiteController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 1

Views: 431

Answers (1)

user1564274
user1564274

Reputation: 51

I had a similar error (didn't try it on an iOS device though) and I added libsqlite3.0.dylib and got it to work on the simulator. Hope this helps!

Upvotes: 5

Related Questions