开发者

Problems using a framework that I have created

I'm trying to create a framework to u开发者_JAVA百科se in some of my projects. Here's what I did so far:

  1. Created a framework project;
  2. Added a class (myFw) to the framework and set the header to public;
  3. Built the framework;
  4. Copied the framework from the built folder to a "visible location";
  5. Added the framework to one of my projects;
  6. Added the path to the framework's Headers to the 'User Header Search Paths'.

When I build my project I get:

Undefined symbols for architecture x86_64:
  "myFw::myFw()", referenced from:
      Playground::Playground() in Playground.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What am I doing wrong to get this linking error? Is the problem in the framework or in the project using the framework?

Another thing: Without Step 6, Xcode's autocomplete helps me type the #include for my class and use it in the code, but when I compile it fails to find the header file... I managed to fix this with Step 6 but assume there's a better way for doing this, right?

(I'm using Xcode 4.1 in Lion)

Thanks in advance!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜