今天第一次使用FMDB之前都是用舊公司的DB讀取資料
一開始先加入
libsqlite3.0.dylib的資料庫
再加入FMDB的src
FMDatabase.h
FMDatabase.m
FMDatabaseAdditions.h
FMDatabaseAdditions.m
fmdb.m
FMResultSet.h
FMResultSet.m
沒想到在compile的時候報錯
訊息為
duplicate symbol _main in:
/Users/apple/Library/Developer/Xcode/DerivedData/DogCam-cvhwautedscftlgteittuievolks/Build/Intermediates/DogCam.build/Debug-iphoneos/DogCam.build/Objects-normal/armv7s/main.o
/Users/apple/Library/Developer/Xcode/DerivedData/DogCam-cvhwautedscftlgteittuievolks/Build/Intermediates/DogCam.build/Debug-iphoneos/DogCam.build/Objects-normal/armv7s/fmdb.o
ld: 1 duplicate symbol for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
後來發現只要移除fmdb.m檔就好了
然後引用標題檔
#import "FMDatabase.h"
沒有留言:
張貼留言