我试图在Rubymotion项目中使用SVGKit,但似乎无法构建它。
到目前为止,我已经将SVGKit代码移到了供应商/SVGKit中,并在我的Rakefile中添加了以下内容(否则是一个空白项目)
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
begin
require 'bundler'
Bundler.require
rescue LoadError
end
Motion::Project::App.setup do |app|
app.name = 'SVGKitMotion'
app.frameworks += %w[ CoreText CoreImage libxml2.dylib QuartzCore CoreGraphics UIKit ]
app.vendor_project('vendor/SVGKit', :static,
:products => ["libSVGKit-iOS.1.2.0pre.a"])
end当我试图建造它时,我得到以下信息:
Build ./build/iPhoneSimulator-7.0-Development
Build vendor/SVGKit
Compile vendor/SVGKit/Source/DOM classes/Core DOM/AppleSucksDOMImplementation.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/Attr.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CDATASection.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CharacterData.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/Comment.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSPrimitiveValue.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSRule.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSRuleList.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSStyleDeclaration.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSStyleRule.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSStyleSheet.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSValue.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/CSSValueList.m
Source/DOM classes/Core DOM/CSSValueList.m:47:2: warning: implicit declaration of function 'DDLogVerbose' is invalid in C99 [-Wimplicit-function-declaration]
DDLogVerbose(@"[%@] received new CSS Text, need to split this and save as CSSValue instances: %@", [self class], _cssText);
^
1 warning generated.
Compile vendor/SVGKit/Source/DOM classes/Core DOM/Document.m
Source/DOM classes/Core DOM/Document.m:26:2: warning: implicit declaration of function 'DDLogVerbose' is invalid in C99 [-Wimplicit-function-declaration]
DDLogVerbose( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOUL...
^
1 warning generated.
Compile vendor/SVGKit/Source/DOM classes/Core DOM/DocumentFragment.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/DocumentType.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/DOMHelperUtilities.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/Element.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/EntityReference.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/MediaList.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/NamedNodeMap.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/Node.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/NodeList.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/ProcessingInstruction.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/StyleSheet.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/StyleSheetList.m
Compile vendor/SVGKit/Source/DOM classes/Core DOM/Text.m
Compile vendor/SVGKit/Source/DOM classes/SVG-DOM/SVGAngle.m
Compile vendor/SVGKit/Source/DOM classes/SVG-DOM/SVGAnimatedPreserveAspectRatio.m
Compile vendor/SVGKit/Source/DOM classes/SVG-DOM/SVGDefsElement.m
In file included from Source/DOM classes/SVG-DOM/SVGDefsElement.m:1:
Source/DOM classes/SVG-DOM/SVGDefsElement.h:5:9: fatal error: 'SVGElement.h' file not found
#import "SVGElement.h"
^
1 error generated.
rake aborted!
Command failed with status (1): [/Applications/Xcode.app/Contents/Developer...]
/Library/RubyMotion/lib/motion/project/vendor.rb:114:in `block (2 levels) in build_static'
/Library/RubyMotion/lib/motion/project/vendor.rb:72:in `each'
/Library/RubyMotion/lib/motion/project/vendor.rb:72:in `block in build_static'
/Library/RubyMotion/lib/motion/project/vendor.rb:65:in `chdir'
/Library/RubyMotion/lib/motion/project/vendor.rb:65:in `build_static'
/Library/RubyMotion/lib/motion/project/vendor.rb:42:in `build'
/Library/RubyMotion/lib/motion/project/builder.rb:65:in `block in build'
/Library/RubyMotion/lib/motion/project/builder.rb:64:in `each'
/Library/RubyMotion/lib/motion/project/builder.rb:64:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:76:in `build'
/Library/RubyMotion/lib/motion/project/template/ios.rb:46:in `block (2 levels) in <top (required)>'
/Library/RubyMotion/lib/motion/project/template/ios.rb:63:in `block in <top (required)>'
Tasks: TOP => build:simulator
(See full trace by running task with --trace)有人能对我哪里出了问题提出建议吗?
发布于 2014-02-27 19:22:07
DDLogVerbose是来自CocoaLumberjack的函数。要使这件事变得简单,最好的办法是通过SVGKit安装CocoaPods。为此,首先安装
sudo gem install motion-cocoapods这应该安装cocoapods和。您需要设置cocoapods,所以请运行
pod setup现在,您可以在Gemfile中添加
gem 'motion-cocoapods'接下来,将豆荚添加到您的rake文件中。
app.pods do
pod 'SVGKit'
end最后,运行下面的rake命令下载SVGKit
rake pod:install下次你耙的时候,理论上一切都应该只是编译和工作!祝你好运:)
https://stackoverflow.com/questions/21991913
复制相似问题