1

I'm trying to do some Unit Testing on method that includes SQL call wrapped by FMDB. I get a lot of linker errors when i try to build the project such as these ones :

  "_sqlite3_step", referenced from:
      -[FMResultSet next] in FMResultSet.o
      -[FMDatabase executeUpdate:arguments:] in FMDatabase.o
  "_sqlite3_column_name", referenced from:
      -[FMResultSet setupColumnNames] in FMResultSet.o
      -[FMResultSet kvcMagic:] in FMResultSet.o

(there are 27 of them so i wont paste them all ;)

Everything works fine when my project is my active target, but when i set the target to the unit test bundle and add all the .m files to the target, then i get these errors.

Does anybody has any idea where the problem could come from ?

Thanks in advance, Vincent.

user142764
  • 1,893
  • 1
  • 13
  • 15

1 Answers1

2

Your Unit Tests target needs to include sqlite3.c.

That should fix it.

BJ Homer
  • 48,806
  • 11
  • 116
  • 129
  • Yes indeed that was the problem ! I'm new to Xcode and i just began to understand how target and dependencies work. Thanks a lot ! – user142764 Jul 27 '09 at 15:24