美文网首页
Undefined symbols for architectu

Undefined symbols for architectu

作者: 景彧 | 来源:发表于2017-01-18 09:42 被阅读59次

项目编译出现以下的错误:

Undefined symbols for architecture i386:
  "_NSHFSTypeCodeFromFileType", referenced from:
      -[FMDatabase(FMDatabaseAdditions) setApplicationIDString:] in FMDatabaseAdditions.o
  "_NSFileTypeForHFSTypeCode", referenced from:
      -[FMDatabase(FMDatabaseAdditions) applicationIDString] in FMDatabaseAdditions.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法:
按一下快捷键'command+3'在工程中输入字符串#if SQLITE_VERSION_NUMBER >= 3007017进行查找,结果如下图:

Paste_Image.png

然后选中.m文件,进入文件,找到错误中提到的两个方法:
- (uint32_t)applicationID;- (NSString*)applicationIDString;,然后使用下面的判断包括起来

#if TARGET_OS_MAC && !TARGET_OS_IPHONE  

#endif 

结果如果所示:

Paste_Image.png

相关文章

网友评论

      本文标题:Undefined symbols for architectu

      本文链接:https://www.haomeiwen.com/subject/igvvbttx.html