Creating dynamic and static libs from one target
Creating dynamic and static libs from one target
- Subject: Creating dynamic and static libs from one target
- From: eduard <email@hidden>
- Date: Tue, 01 Nov 2005 03:11:46 +0100
Hi,
We are finally moving from our makefile based build environment to Xcode
2.2,
and have a problem setting up the Xcode projects to fit our needs:
Our source tree consists out of several "modules", which are all part of
one
big XCode Project file. One module corresponds to one target in the
project.
The modules are build as static libraries in the Deployment builds, and are
then linked against the final Applications. This works great so far.
To speed up the Edit-Compile-Link-Run cycle, we would like to build the
modules
- depending on the Configuration (while developing only) - as dynamic
libraries
instead of static libraries. Zero-Link doesn't work for us. The
zero-linked
Application crashes on startup.
Is there a possibility to change the product-type dynamically via
Configurations,
so that the same target will be build and linked either statically or
dynamically,
depending on the settings in the Configurations ?
We've tried to change the product-type by setting the build environment
variable PRODUCT_TYPE, but this seems to have no effect on the linker
settings.
Also setting LIBRARY_STYLE to DYNAMIC seems to do nothing at all.
Setting EXECUTABLE_PREFIX to "" and EXECUTABLE_EXTENSION to "dynlib",
and then
passing "-dynamic" to the linker via the OTHER_LDFLAGS works and builds a
dynamic library, but this will pass "-static" /and/ "-dynamic" at the
end to
ld, which feels like a big hack which just works by accident and might
break as
soon as look a little bit too long at it.
Using two targets per module, where one builds the static variant and
the other
the dynamic will of course also work, but the project is already quite
huge, so we
would like to avoid this if somehow possible. This will also be harder
to maintain
at the end...
Thanks for any help!
Greets,
eduard mueller
www.ableton.com
_______________________________________________
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