Re: Creating dynamic and static libs from one target
Re: Creating dynamic and static libs from one target
- Subject: Re: Creating dynamic and static libs from one target
- From: eduard mueller <email@hidden>
- Date: Tue, 01 Nov 2005 21:18:44 +0100
- Organization: Ableton
Hi Andreas,
Andreas Grosam wrote:
On 01.11.2005, at 03:11, eduard wrote:
[...]
Maybe this might work:
1) Create a custom Configuration file for your project, say
MyDylibSet.xcconfig. (see Xcode help how to accomplish this)
2) For each library, in the info panel of your libraries, for the
debug configuration only, make the configuration depend upon your
custom config file MyDylibSet.xcconfig
3) Edit the Configuration file such that it contains all required
settings to build a dynamic lib, especially set
LIBRARY_STYLE = DYNAMIC and appropriate compiler flags and other
settings.
For hints which settings to choose, compare a default dynamic and
static build setting. Just drag the value and key which you would
like to set in your custom file from within the Info Panel into your
custom config file in order to get key and values pairs as text.
4) In the target info panel of your library **delete** all settings
which you added in the assigned Configuration file. This is
necessary, because the target settings would otherwise still override
the custom configuration settings.
Yes, thats how we already have done it. There are four configurations,
all only based on
xcconfig files only: Debug, Release, DebugDynlib, ReleaseDynlib
The problem is, that setting LIBRARY_STYLE to DYNAMIC seems to have no
effect at all.
The way how the .o`s are linked together seems to be only specified by
the "productType" property of
the target, which can not be modified via configuration settings. (try a
search in the pbxproj file
for for example "productType = "com.apple.product-type.library.static";").
As said before, adjusting also EXECUTABLE_PREFIX and
EXECUTABLE_EXTENSION and then passing "-dynamic"
via OTHER_LDFLAGS somehow works, but feel like a big hack.
If you want to modify or extend the custom settings in the info panel
of the target settings, use this syntax:
In the Info Panel:
KEY $(value) extension
which in this case, adds the value "extension" to the existing
setting represented by the variable "value", which is the value of
the base configuration file. For the Debug Configuration, this is
your value set in the custom config file.
Notice, that the name of the base value is literally "value".
Thanks for the "$(value)" trick! I wasnt aware of this one. This will
safe a lot of copy and pasting :)
Greets,
eduard
_______________________________________________
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