Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

倒入项目遇到的一些问题 #3

Closed
dowhilenet opened this issue Oct 20, 2015 · 4 comments
Closed

倒入项目遇到的一些问题 #3

dowhilenet opened this issue Oct 20, 2015 · 4 comments

Comments

@dowhilenet
Copy link

Pitaya是通过git方法手动倒入的。在项目中import Pitaya都没有任何的问题。可是调用

 Pita.build(HTTPMethod: .GET, url: "https://httpbin.org/get?hello=Hello%20Pitaya!")
    .responseJSON { (json, response) -> Void in
        print(json["args"]["hello"].stringValue) // get "Hello Pitaya!"
}

就会提示有错误

Undefined symbols for architecture x86_64:
  "JSONNeverDie.JSONND.stringValue.getter : Swift.String", referenced from:
      WeatherQ.ViewController.(viewDidLoad (WeatherQ.ViewController) -> () -> ()).(closure #1) in ViewController.o
  "JSONNeverDie.JSONND.subscript.getter : (Swift.String) -> JSONNeverDie.JSONND", referenced from:
      WeatherQ.ViewController.(viewDidLoad (WeatherQ.ViewController) -> () -> ()).(closure #1) in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

不知道是什么问题。谢谢解答。

@johnlui
Copy link
Owner

johnlui commented Oct 20, 2015

clean 一下吧。

@dowhilenet
Copy link
Author

Clean了一下还是那个问题。报错的时候紧紧只是在有这句代码的时候print(json["args"]["hello"].stringValue)。build通不过,删除这句代码后就可 build通过。很是好奇。

@johnlui
Copy link
Owner

johnlui commented Oct 20, 2015

明白了,应该是库没引入。你在顶上 import JSONNeverDie 试一下。

@dowhilenet
Copy link
Author

嗯嗯好了。是这个问题。😄谢谢。。。

@johnlui johnlui closed this as completed Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants