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

推荐阅读
  • 在加载一个第三方厂商的dll文件时,提示“找不到指定模块,加载失败”。由于缺乏必要的技术支持,百思不得期间。后来发现一个有用的工具 ... [详细]
  • 篇首语:本文由编程笔记#小编为大家整理,主要介绍了iOS开发--漫谈内存管理相关的知识,希望对你有一定的参考价值。 ... [详细]
  • Objective C接入Sonar代码扫描
    目录技术方案环境准备扫描器配置项目配置SonarQube配置jenkins接入一些坑技术方案Sonar本身有对OC的代码扫描插件——SonarCFamily,但是是收费的。出于成本 ... [详细]
  • 本文总结了在开发中使用gulp时的一些技巧,包括如何使用gulp.dest自动创建目录、如何使用gulp.src复制具名路径的文件以及保留文件夹路径的方法等。同时介绍了使用base选项和通配符来保留文件夹路径的技巧,并提到了解决带文件夹的复制问题的方法,即使用gulp-flatten插件。 ... [详细]
  • 本文记录了在vue cli 3.x中移除console的一些采坑经验,通过使用uglifyjs-webpack-plugin插件,在vue.config.js中进行相关配置,包括设置minimizer、UglifyJsPlugin和compress等参数,最终成功移除了console。同时,还包括了一些可能出现的报错情况和解决方法。 ... [详细]
  • VueCLI多页分目录打包的步骤记录
    本文介绍了使用VueCLI进行多页分目录打包的步骤,包括页面目录结构、安装依赖、获取Vue CLI需要的多页对象等内容。同时还提供了自定义不同模块页面标题的方法。 ... [详细]
  • CentOS7.8下编译muduo库找不到Boost库报错的解决方法
    本文介绍了在CentOS7.8下编译muduo库时出现找不到Boost库报错的问题,并提供了解决方法。文章详细介绍了从Github上下载muduo和muduo-tutorial源代码的步骤,并指导如何编译muduo库。最后,作者提供了陈硕老师的Github链接和muduo库的简介。 ... [详细]
  • 其实之前也有下载过完整的android源码,但是从来没有对这个做过一些总结,在加上最近需要经常去看,索性就在从新下载,编译一下,其实这些东西官网上面都有。http:sou ... [详细]
  • iOS逆向工程(三):利用Cycript调试App
    利用Cycript调试App一、Cycript是什么?Cycript是一种脚本语言,是Ob ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 本文介绍了在Android Studio中使用命令行build gradle的方法,并解决了一些常见问题,包括手动配置gradle环境变量和解决External Native Build Issues的方法。同时提供了相关参考文章链接。 ... [详细]
  • PatchODAX8: ... [详细]
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社区 版权所有