开发者

Why can't i use external header?

开发者 https://www.devze.com 2023-04-10 01:41 出处:网络
I created a \"Cocoa Touch Static Library\" and it buil开发者_如何学编程ds just fine. Peachy so far. Then I created a view based application for iOS. I can import the header from my previously created

I created a "Cocoa Touch Static Library" and it buil开发者_如何学编程ds just fine. Peachy so far. Then I created a view based application for iOS. I can import the header from my previously created lib, but I can't run the program. It's always returning:

Undefined symbols for architecture i386:

"_OBJC_CLASS_$_GenericList", referenced from:

objc-class-ref in Hello_World_2ViewController.o"

Why is this happening?


It seems like you're not linking against the actual library files, just somehow referenced the header file. Three20 is a popular third-party iOS library, and they have a documentation article on how to add it to your project – look lower on the page for "Manually add Three20 to your project" and adapt the process for your library by skipping any steps that aren't applicable.

Alternately, I'm also guessing that drag-and-dropping the library's .h and .a files into your app's project might Just Work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号