热门标签 | 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 

推荐阅读
  • 20100423:Fixes:更新批处理,以兼容WIN7。第一次系统地玩QT,于是诞生了此预备式:【QT版本4.6.0&#x ... [详细]
  • 使用GDI的一些AIP函数我们可以轻易的绘制出简 ... [详细]
  • 本文探讨了在Java多线程环境下,如何确保具有相同key值的线程能够互斥执行并按顺序输出结果。通过优化代码结构和使用线程安全的数据结构,我们解决了线程同步问题,并实现了预期的并发行为。 ... [详细]
  • 深入解析Redis内存对象模型
    本文详细介绍了Redis内存对象模型的关键知识点,包括内存统计、内存分配、数据存储细节及优化策略。通过实际案例和专业分析,帮助读者全面理解Redis内存管理机制。 ... [详细]
  • 本文探讨了使用C#在SQL Server和Access数据库中批量插入多条数据的性能差异。通过具体代码示例,详细分析了两种数据库的执行效率,并提供了优化建议。 ... [详细]
  • 对象自省自省在计算机编程领域里,是指在运行时判断一个对象的类型和能力。dir能够返回一个列表,列举了一个对象所拥有的属性和方法。my_list[ ... [详细]
  • 本文详细介绍了优化DB2数据库性能的多种方法,涵盖统计信息更新、缓冲池调整、日志缓冲区配置、应用程序堆大小设置、排序堆参数调整、代理程序管理、锁机制优化、活动应用程序限制、页清除程序配置、I/O服务器数量设定以及编入组提交数调整等方面。通过这些技术手段,可以显著提升数据库的运行效率和响应速度。 ... [详细]
  • 深入解析Java枚举及其高级特性
    本文详细介绍了Java枚举的概念、语法、使用规则和应用场景,并探讨了其在实际编程中的高级应用。所有相关内容已收录于GitHub仓库[JavaLearningmanual](https://github.com/Ziphtracks/JavaLearningmanual),欢迎Star并持续关注。 ... [详细]
  • 本题来自WC2014,题目编号为BZOJ3435、洛谷P3920和UOJ55。该问题描述了一棵不断生长的带权树及其节点上小精灵之间的友谊关系,要求实时计算每次新增节点后树上所有可能的朋友对数。 ... [详细]
  • 本文探讨了如何通过预处理器开关选择不同的类实现,并解决在特定情况下遇到的链接器错误。 ... [详细]
  • 在高并发需求的C++项目中,我们最初选择了JsonCpp进行JSON解析和序列化。然而,在处理大数据量时,JsonCpp频繁抛出异常,尤其是在多线程环境下问题更为突出。通过分析发现,旧版本的JsonCpp存在多线程安全性和性能瓶颈。经过评估,我们最终选择了RapidJSON作为替代方案,并实现了显著的性能提升。 ... [详细]
  • 深入解析Spring启动过程
    本文详细介绍了Spring框架的启动流程,帮助开发者理解其内部机制。通过具体示例和代码片段,解释了Bean定义、工厂类、读取器以及条件评估等关键概念,使读者能够更全面地掌握Spring的初始化过程。 ... [详细]
  • 本文详细介绍如何在Linux系统中配置SSH密钥对,以实现从一台主机到另一台主机的无密码登录。内容涵盖密钥对生成、公钥分发及权限设置等关键步骤。 ... [详细]
  • 本文详细探讨了JavaScript中的作用域链和闭包机制,解释了它们的工作原理及其在实际编程中的应用。通过具体的代码示例,帮助读者更好地理解和掌握这些概念。 ... [详细]
  • 本文详细介绍了流编辑器sed中的G、H、g、h命令,探讨了它们的工作原理及应用场景。通过实例解析和图解分析,帮助读者掌握这些高级命令的使用方法。 ... [详细]
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社区 版权所有