热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

使用旧库时出现xcode错误-xcodeerrorwhenusingoldlibrary

IupdatemyMacto1.9.4andinstallXcode6,IcreatedanewprojectandcopyUIBubbleTablesource

I update my Mac to 1.9.4 and install Xcode 6, I created a new project and copy UIBubbleTable source from the project which I used this library before and still work fine according to my last time check.

我将Mac升级到1.9.4并安装了Xcode 6,我创建了一个新项目,并从我以前使用过这个库的项目中复制了UIBubbleTable源代码,根据我上次的检查,仍然运行良好。

The old project works fine with this library, but new project gets error.

旧的项目在这个库中工作得很好,但是新项目会出错。

enter image description here

I've added every requires framework but still error.

我已经添加了所有需要的框架,但仍然是错误的。

Here are my error logs, please help.

这是我的错误日志,请帮忙。

CompileC /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.o Troll\ Kitty/NSBubbleData.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty"
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -miphoneos-version-min=7.1 -iquote /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-generated-files.hmap -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-own-target-headers.hmap -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-all-target-headers.hmap -iquote /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-project-headers.hmap -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/DerivedSources/armv7 -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/DerivedSources -F/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.d --serialize-diagnostics /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.dia -c /Users/vietnguyen/Desktop/Troll\ Kitty/Troll\ Kitty/Troll\ Kitty/NSBubbleData.m -o /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.o

In file included from /Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:11:
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:23:41: error: unknown type name 'UIView'
@property (readonly, nonatomic, strong) UIView *view;
                                        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:23:1: error: property with 'retain (or strong)' attribute must be of object type
@property (readonly, nonatomic, strong) UIView *view;
^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:24:33: error: unknown type name 'UIEdgeInsets'
@property (readonly, nonatomic) UIEdgeInsets insets;
                                ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:25:31: error: unknown type name 'UIImage'
@property (nonatomic, strong) UIImage *avatar;
                              ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:25:1: error: property with 'retain (or strong)' attribute must be of object type
@property (nonatomic, strong) UIImage *avatar;
^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:27:31: error: unknown type name 'UIImageView'
@property (nonatomic, strong) UIImageView *viewAvatar;
                              ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:27:1: error: property with 'retain (or strong)' attribute must be of object type
@property (nonatomic, strong) UIImageView *viewAvatar;
^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:31:22: error: expected a type
- (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type;
                     ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:32:22: error: expected a type
+ (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type;
                     ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:33:21: error: expected a type
- (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets;
                    ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:33:87: error: expected a type
- (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets;
                                                                                      ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:34:21: error: expected a type
+ (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets;
                    ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:34:87: error: expected a type
+ (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets;
                                                                                      ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:46:7: error: unknown type name 'UIEdgeInsets'
const UIEdgeInsets textInsetsMine = {5, 10, 11, 17};
      ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:47:7: error: unknown type name 'UIEdgeInsets'
const UIEdgeInsets textInsetsSomeOne= {5, 15, 11, 10};
      ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:102:7: error: unknown type name 'UIEdgeInsets'
const UIEdgeInsets imageInsetsMine = {11, 13, 16, 22};
      ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:103:7: error: unknown type name 'UIEdgeInsets'
const UIEdgeInsets imageInsetsSomeOne= {11, 18, 16, 14};
      ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:105:22: error: expected a type
+ (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type
                     ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:114:22: error: expected a type
- (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

1 个解决方案

#1


16  

It looks like that library expects a .pch file which imports UIKit/UIKit.h (see UIBubbleTableViewExample-Prefix.pch in the example directory). You can either add a similar pch file to your project. Or you can add the following to the header files where you are seeing those errors:

看起来这个库需要一个.pch文件来导入UIKit/UIKit。h(见UIBubbleTableViewExample-Prefix。在示例目录中的pch)。您可以向项目添加类似的pch文件。或者,您可以在看到这些错误的头文件中添加以下内容:

#import 

推荐阅读
  • 如何高效学习鸿蒙操作系统:开发者指南
    本文探讨了开发者如何更有效地学习鸿蒙操作系统,提供了来自行业专家的建议,包括系统化学习方法、职业规划建议以及具体的开发技巧。 ... [详细]
  • 一、使用Microsoft.Office.Interop.Excel.DLL需要安装Office代码如下:2publicstaticboolExportExcel(S ... [详细]
  • egg实现登录鉴权(七):权限管理
    权限管理包含三部分:访问页面的权限,操作功能的权限和获取数据权限。页面权限:登录用户所属角色的可访问页面的权限功能权限:登录用户所属角色的可访问页面的操作权限数据权限:登录用户所属 ... [详细]
  • iOS如何实现手势
    这篇文章主要为大家展示了“iOS如何实现手势”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“iOS ... [详细]
  • 本文由chszs撰写,详细介绍了Apache Mina框架的核心开发流程及自定义协议处理方法。文章涵盖从创建IoService实例到协议编解码的具体步骤,适合希望深入了解Mina框架应用的开发者。 ... [详细]
  • 本文详细介绍了 Node.js 中 OS 模块的 arch 方法,包括其功能、语法、参数以及返回值,并提供了具体的使用示例。 ... [详细]
  • ArcBlock 发布 ABT 节点 1.0.31 版本更新
    2020年11月9日,ArcBlock 区块链基础平台发布了 ABT 节点开发平台的1.0.31版本更新,此次更新带来了多项功能增强与性能优化。 ... [详细]
  • 本文详细介绍了如何在 Ubuntu 14.04 系统上搭建仅使用 CPU 的 Caffe 深度学习框架,包括环境准备、依赖安装及编译过程。 ... [详细]
  • 本文探讨了异步编程的发展历程,从最初的AJAX异步回调到现代的Promise、Generator+Co以及Async/Await等技术。文章详细分析了Promise的工作原理及其源码实现,帮助开发者更好地理解和使用这一重要工具。 ... [详细]
  • 本文详细介绍如何在 Apache 中设置虚拟主机,包括基本配置和高级设置,帮助用户更好地理解和使用虚拟主机功能。 ... [详细]
  • 利用Node.js实现PSD文件的高效切图
    本文介绍了如何通过Node.js及其psd2json模块,快速实现PSD文件的自动化切图过程,以适应项目中频繁的界面更新需求。此方法不仅提高了工作效率,还简化了从设计稿到实际应用的转换流程。 ... [详细]
  • 为何Compose与Swarm之后仍有Kubernetes的诞生?
    探讨在已有Compose和Swarm的情况下,Kubernetes是如何以其独特的设计理念和技术优势脱颖而出,成为容器编排领域的领航者。 ... [详细]
  • Docker安全策略与管理
    本文探讨了Docker的安全挑战、核心安全特性及其管理策略,旨在帮助读者深入理解Docker安全机制,并提供实用的安全管理建议。 ... [详细]
  • 问题描述现在,不管开发一个多大的系统(至少我现在的部门是这样的),都会带一个日志功能;在实际开发过程中 ... [详细]
  • Android与JUnit集成测试实践
    本文探讨了如何在Android项目中集成JUnit进行单元测试,并详细介绍了修改AndroidManifest.xml文件以支持测试的方法。 ... [详细]
author-avatar
隔壁小王
刚开始
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有