• 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: Xcode - linking libraries based on Configuration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode - linking libraries based on Configuration


  • Subject: Re: Xcode - linking libraries based on Configuration
  • From: email@hidden
  • Date: Tue, 31 Jan 2006 13:57:26 -0500


Dave,  

Not exactly.


Here is a clearer example.  The following is the folder layout

Master_build_folder/
Master_build_folder/h  - common header files
Master_build_folder/MachORel - common build folder for Release configuration
Master_build_folder/MachODbg - common build folder for Debug configuration

Master_build_folder/Lib/StaticLib_B = project folder for a static library

Master_build_folder/App/foo_a = project folder for application.


Setup "StaticLib_B" to
        1. Set the "Per-Configuration Build" to $(Project_dir)/$(Configuration)   I.E. Master_build_folder/Lib/StaticLib_B/$(Configuration).
        2. Set the Per- Configuration nstallation path to ../MachODbg for Debug build and ../MachORel for Release build.
        3. Added a script to copy from $(Configuration)/StaticLib_b.o to $(INSTALL_PATH)//StaticLib_b

Setup "foo_a" to
        1. Set the "Per-Configuration Build" to $(Project_dir)/$(Configuration)  
        2. Set the installation path to ../MachODbg for Debug build and ../MachORel for Release build.
        3. Added a script to copy from $(INSTALL_PATH)/StaticLib_b to $(Configuration)/StaticLib_b

        Optionally you can copy the build app to the common build folder  (Master_build_folder/MachORel).


The only other thing to be aware of is that the () are left off in the scripts.

So in the script it would be something like

script
cp -Rfpv $CONFIGURATION/StaticLib_b.o $INSTALL_PATH/StaticLib.o

input file
 $CONFIGURATION/StaticLib_b

output file
 $INSTALL_PATH/StaticLib.o


       
Lou Sakey
DFIS WW S+SE LOWELL DEVELOPMENT CTR
email@hidden
KNET 27-67676
978-323-7676



David Cohn <email@hidden>

01/31/2006 12:05 PM

To
email@hidden
cc
email@hidden
Subject
Re: Xcode - linking libraries based on Configuration





Lou,

Sounds workable, if a bit cumbersome...
If I understand you correctly, every time you switch Configurations  
in project A, you also have to rebuild B?

Thanks,
--Dave



On Jan 31, 2006, at 8:34 AM, email@hidden wrote:

> I don't believe the search paths are used or if they are used the  
> filename does not get separated from the path cleanly.
> The only way I was able to use different paths for different  
> configurations was to add build steps
> to copy the libraries around.
>
> For example if project a links in a static link from project b
>
> I set up project b to copy the build library from $CONFIGURATION/
> xxx.o to a common base folder.
> Then I modified project a to copy from the common base folder to  
> $CONFIGURATION.
>
>  Lou Sakey
> DFIS WW S+SE LOWELL DEVELOPMENT CTR
> email@hidden
> KNET 27-67676
> 978-323-7676
>
>
>
> >> I've got a project with two Build Configurations-- Debug and  
> Release.
> >> "Library Search Paths" includes a "Debug" directory for one
> >> Configuration, and a "Release" directory for the other. (Both
> >> directories contain a "linkedlib.a")
> >>
> >
> > Don't do this.
>
>
> "Don't do this" seems unambiguously dire, but this is the only way I
> can get this to work...
>
> Does anyone know why this shouldn't be done?


 _______________________________________________
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: 
 >Re: Xcode - linking libraries based on Configuration (From: David Cohn <email@hidden>)

  • Prev by Date: Re: Undefined symbols - cross development
  • Next by Date: Re: Debugger can't find correct source file
  • Previous by thread: Re: Xcode - linking libraries based on Configuration
  • Next by thread: Flagging errors from inside a Run Script build phase
  • Index(es):
    • Date
    • Thread