SoftCoder
SoftCoder

Reputation: 167

Undefined symbols for architecture i386: "_sqlite3_open", referenced from:

enter image description hereenter image description herei have sqlite3.dylib also in my application, but it give me that upper error i don't know that how to fix this error. please someone help me i am waiting?

Undefined symbols for architecture i386:

"_sqlite3_open", referenced from:

-[MyDataBase openOrCreateDatabase:] in MyDataBase.o enter image description here "_sqlite3_exec", referenced from:

-[MyDataBase createTable:] in MyDataBase.o

-[MyDataBase InsertTable:] in MyDataBase.o

-[MyDataBase UpdataTable:] in MyDataBase.o

-[MyDataBase queryTableByCallBack:] in MyDataBase.o

"_sqlite3_close", referenced from:

-[MyDataBase closeDatabase] in MyDataBase.o

"_sqlite3_get_table", referenced from:

-[MyDataBase queryTable:] in MyDataBase.o

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 2

Views: 1001

Answers (1)

Rob
Rob

Reputation: 437442

You're showing us the linked libraries for the "Fortress of Muslim" target, but your linker error is happening on the other target, the "Fortress of MuslimTests" target.

Either remove the dependency to SQLite in the "Tests" target, or include SQLite to the list of linked libraries for that target.

Upvotes: 3

Related Questions