Noob question - Linker Error

778 views
Skip to first unread message

jpo...@ipipes.com

unread,
Feb 15, 2013, 4:57:15 PM2/15/13
to fm...@googlegroups.com
I have added the source to my project and it won't link properly.

iOS simulator

Undefined symbols for architecture i386:

  "_OBJC_CLASS_$_FMDatabase", referenced from:

      objc-class-ref in GlobalData.o

ld: symbol(s) not found for architecture i386

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


iPad target

Undefined symbols for architecture armv7:

  "_OBJC_CLASS_$_FMDatabase", referenced from:

      objc-class-ref in GlobalData.o

ld: symbol(s) not found for architecture armv7

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


Any help appreciated

TIA

jpo...@ipipes.com

unread,
Feb 15, 2013, 5:19:25 PM2/15/13
to fm...@googlegroups.com


On Friday, February 15, 2013 3:57:15 PM UTC-6, jpo...@ipipes.com wrote:
I have added the source to my project and it won't link properly.

Any help appreciated

TIA

Undefined symbols for architecture armv7:

  "_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_column_double", referenced from:

      -[FMResultSet doubleForColumnIndex:] in FMResultSet.o

  "_sqlite3_column_int", referenced from:

      -[FMResultSet intForColumnIndex:] in FMResultSet.o

  "_sqlite3_column_blob", referenced from:

      -[FMResultSet dataForColumnIndex:] in FMResultSet.o

      -[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o

  "_sqlite3_data_count", referenced from:

      -[FMResultSet resultDict] in FMResultSet.o

      -[FMResultSet resultDictionary] in FMResultSet.o

  "_sqlite3_column_count", referenced from:

      -[FMResultSet columnCount] in FMResultSet.o

      -[FMResultSet columnNameToIndexMap] in FMResultSet.o

      -[FMResultSet kvcMagic:] in FMResultSet.o

      -[FMResultSet resultDictionary] in FMResultSet.o

  "_sqlite3_create_function", referenced from:

      -[FMDatabase makeFunctionNamed:maximumArguments:withBlock:] in FMDatabase.o

  "_sqlite3_user_data", referenced from:

      _FMDBBlockSQLiteCallBackFunction in FMDatabase.o

  "_sqlite3_prepare_v2", referenced from:

      -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMDatabase(FMDatabaseAdditions) validateSQL:error:] in FMDatabaseAdditions.o

  "_sqlite3_threadsafe", referenced from:

      +[FMDatabase isSQLiteThreadSafe] in FMDatabase.o

      -[FMDatabase initWithPath:] in FMDatabase.o

  "_sqlite3_bind_null", referenced from:

      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o

  "_sqlite3_column_name", referenced from:

      -[FMResultSet columnNameToIndexMap] in FMResultSet.o

      -[FMResultSet kvcMagic:] in FMResultSet.o

      -[FMResultSet resultDictionary] in FMResultSet.o

      -[FMResultSet columnNameForIndex:] in FMResultSet.o

  "_sqlite3_errcode", referenced from:

      -[FMDatabase lastErrorCode] in FMDatabase.o

      -[FMDatabase errorWithMessage:] in FMDatabase.o

      -[FMResultSet hasAnotherRow] in FMResultSet.o

  "_sqlite3_bind_int", referenced from:

      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o

  "_sqlite3_libversion", referenced from:

      +[FMDatabase sqliteLibVersion] in FMDatabase.o

  "_sqlite3_bind_parameter_count", referenced from:

      -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

  "_sqlite3_bind_double", referenced from:

      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o

  "_sqlite3_open_v2", referenced from:

      -[FMDatabase openWithFlags:] in FMDatabase.o

  "_sqlite3_reset", referenced from:

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMStatement reset] in FMDatabase.o

      -[FMResultSet next] in FMResultSet.o

  "_sqlite3_changes", referenced from:

      -[FMDatabase changes] in FMDatabase.o

  "_sqlite3_bind_int64", referenced from:

      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o

  "_sqlite3_open", referenced from:

      -[FMDatabase open] in FMDatabase.o

  "_sqlite3_last_insert_rowid", referenced from:

      -[FMDatabase lastInsertRowId] in FMDatabase.o

  "_sqlite3_step", referenced from:

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMResultSet next] in FMResultSet.o

  "_sqlite3_column_bytes", referenced from:

      -[FMResultSet dataForColumnIndex:] in FMResultSet.o

      -[FMResultSet dataNoCopyForColumnIndex:] in FMResultSet.o

  "_sqlite3_bind_parameter_index", referenced from:

      -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

  "_sqlite3_bind_blob", referenced from:

      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o

  "_sqlite3_close", referenced from:

      -[FMDatabase close] in FMDatabase.o

  "_sqlite3_column_text", referenced from:

      -[FMResultSet kvcMagic:] in FMResultSet.o

      -[FMResultSet stringForColumnIndex:] in FMResultSet.o

      -[FMResultSet UTF8StringForColumnIndex:] in FMResultSet.o

  "_sqlite3_finalize", referenced from:

      -[FMDatabase close] in FMDatabase.o

      -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMStatement close] in FMDatabase.o

      -[FMDatabase(FMDatabaseAdditions) validateSQL:error:] in FMDatabaseAdditions.o

  "_sqlite3_errmsg", referenced from:

      -[FMDatabase lastErrorMessage] in FMDatabase.o

      -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in FMDatabase.o

      -[FMResultSet next] in FMResultSet.o

  "_sqlite3_column_int64", referenced from:

      -[FMResultSet longForColumnIndex:] in FMResultSet.o

      -[FMResultSet longLongIntForColumnIndex:] in FMResultSet.o

  "_sqlite3_next_stmt", referenced from:

      -[FMDatabase close] in FMDatabase.o

  "_sqlite3_bind_text", referenced from:

      -[FMDatabase bindObject:toColumn:inStatement:] in FMDatabase.o

Gus Mueller

unread,
Feb 15, 2013, 5:53:51 PM2/15/13
to fm...@googlegroups.com
On Feb 15, 2013, at 2:19 PM, jpo...@ipipes.com wrote:

> On Friday, February 15, 2013 3:57:15 PM UTC-6, jpo...@ipipes.com wrote:
>>
>> I have added the source to my project and it won't link properly.
>>
>> Any help appreciated

You need to make sure that FMDatabase (and it's classes) are compiled as part of your project. You also need to add the sqlite.dylib to it as well.

Hope that helps,

-gus

jpo...@ipipes.com

unread,
Feb 18, 2013, 8:13:40 AM2/18/13
to fm...@googlegroups.com
Somehow the first time I dragged sqlite3.dylib into the project it didn't pick it up. I removed it and dragged it in again and it linked without issue.

Thanks.

Mss iOS

unread,
Oct 24, 2016, 12:43:19 PM10/24/16
to FMDB
Hello ,


i am getting crash on this line FMDB library 

-[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] +

Gus Mueller

unread,
Oct 24, 2016, 12:44:08 PM10/24/16
to fm...@googlegroups.com
On Oct 23, 2016, at 10:11 PM, Mss iOS <mss.i...@gmail.com> wrote:

i am getting crash on this line FMDB library 

-[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] +

This isn't enough information to determine what the cause is.


-gus
Reply all
Reply to author
Forward
0 new messages