A question about building target in xcode

Apprentice
Posts: 19
Joined: 2007.07
Post: #1
i created a new carbon static library project, then added a cpp file and its header file in it. I wrote a line of code in the cpp file: "#include <Files.h>". But when i built it, the xcode reported a error: Files.h: No such file or directory.
I am new to xcode, so maybe my question is so stupid, but i still hope somebody can give me a answer! Thanks a lot.
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #2
Tried #include <Carbon/Files.h>?

You also might need to add the Carbon framework to your project.
Quote this message in a reply
Apprentice
Posts: 19
Joined: 2007.07
Post: #3
Thank u for ur answer.
But after i tried ur method, the problem still exists.
i use the function "HOpenDF" in my code, it is declared in the header file "Files.h", right?
However, after i deleted the code "#include <Files.h>", i can build my code successfully with a warning: " 'HOpenDF' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/..blahblah.../Headers/Files.h").
So i added this resulted static library (*.a) to my main program (a C++ command-line tool), then built my main program successfully.But, when i ran its product, it failed with a message: "Zerolink:unknown symbol '_HOpenDF' ". It is more confused that it can work without any error when i debug my main program step by step in the debug status.
so i really need ur advice, thank you again.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
You need to add the Carbon framework to your main program.
Quote this message in a reply
Apprentice
Posts: 19
Joined: 2007.07
Post: #5
thank u, it really works. LOL
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Question : Deploy xcode 3.1.3 to ios 5+ ? papaonn 6 6,160 Apr 12, 2012 08:37 PM
Last Post: MattDiamond
  Aggregate target difficulty AnotherJake 9 6,188 Apr 30, 2010 10:03 PM
Last Post: AnotherJake
  Stupid xcode question: How do I turn off precompiled headers? SourceIT 2 7,474 Aug 30, 2008 12:53 PM
Last Post: SourceIT
  Target Applications not created Ummon 0 2,375 Nov 21, 2007 03:31 PM
Last Post: Ummon
  Need help building Crystal Space Engine mr98321 14 7,602 Jul 20, 2007 12:32 PM
Last Post: Cross