• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Proper way to compile static libraries into projects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper way to compile static libraries into projects?


  • Subject: Re: Proper way to compile static libraries into projects?
  • From: Alexander von Below <email@hidden>
  • Date: Tue, 20 Nov 2007 14:44:18 +0100


Am 20.11.2007 um 14:35 schrieb Army Research Lab:

My question are thus:

1) Is this is the best way to organize things?
To help organize
things, I would like to have a single project with many different targets.
I want each of the libraries to be statically linked (I'm targeting an
embedded system, there's no point in anything else), and I want to have one
target for each main that I have (unit test driver main, application main,
etc.)

That sounds like a perfectly good way to organize things. Some people create sub-projects, but, if I may say so, if it was my task to set up the project, I would do it exactly like that.


2) How do I tell Xcode that one target is dependent on one or more other
targets? Basically, how do I get the libfoo.a referenced in my main target
when it hasn't been built yet?

You said:
The libraries are blobs of source code, along with a slew of compile
instructions, but no makefiles or other build files.


I assume you will create targets for each of the libraries, yes? If so, you can drag the libfoo.a files from the "Projects" group into your project to make them a dependency.
The whole thing is explained here:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide/Contents/Resources/en.lproj/05_02_bs_targets/chapter_31_section_3.html#/ /apple_ref/doc/uid/TP40002689-SW11


3) Is there anything special I have to do to link everything together? I
already have the header files in the project, but it would quite handy to
pretend that they are all packaged together with the library, even though it
won't actually be installed on any system.

I am not sure I understand the question, but my answer would be: No, you do not need to do anything special


Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Proper way to compile static libraries into projects? (From: Army Research Lab <email@hidden>)

  • Prev by Date: Re: Problem with #include <unistd.h> - 'close' was not declared
  • Next by Date: HOW TO USE- Shared Object library in C++ for flash?
  • Previous by thread: Proper way to compile static libraries into projects?
  • Next by thread: HOW TO USE- Shared Object library in C++ for flash?
  • Index(es):
    • Date
    • Thread