1

i just tried to create a database in my iPhone app and couldn't build it. i used following tutorial: tutorial

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *docsPath = [paths objectAtIndex:0];
    NSString *path = [docsPath stringByAppendingPathComponent:@"database.sqlite"];
    FMDatabase *database = [FMDatabase databaseWithPath:path];
    [database open];

but when running the app i get following error message:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_FMDatabase", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is it because iam using a 64bit system? Just were looking for another version of FMDB but could only find the one on gitHub FMDB repository

4

1 に答える 1

1

Make sure FMDataBase.m is in your compile sources in the 'Build Phases' section

于 2012-06-03T18:34:42.253 に答える