Re: From Makefile to XCode
Re: From Makefile to XCode
- Subject: Re: From Makefile to XCode
- From: "E. Wing" <email@hidden>
- Date: Wed, 4 Apr 2007 16:04:48 -0700
It's been a long time so I forgot a bunch of the details. But this is
kind of a bug or short coming in my opinion. I haven't checked to see
if Apple fixed it recently, but I'll presume they haven't since you're
having problems.
There is no specific template I know of to handle this. So I believe I
started with the BSD dynamic library template like you. Once upon a
time, just changing a parameter or two worked with Xcode, but I think
somewhere in the Xcode 2 series, this broke, and you had to specify
your own settings and values and override others because they caused
conflicts. The only way I learned about this was filing a bug report
with Apple and they told me which settings I needed to manually add
and change to work around the problem.
So the obvious thing is to change the Mach-O Type to Bundle. I think
this used to be sufficient, but no longer. So these are the
instructions sent to me:
<quote>
- Set DYLIB_COMPATIBILITY_VERSION to the empty string, to remove the
-compatibility_version argument. (Don't delete it entirely if
building a dylib product type, since the product type's default is 1.)
- Set DYLIB_CURRENT_VERSION to the empty string, to remove the
-current_version argument. (Again, don't delete it entirely if
building a dylib product type.)
- Set GENERATE_MASTER_OBJECT_FILE to YES to remove the
-Wl,-single_module argument.
</quote>
In my Xcode project, I also have a setting called LIBRARY_STYLE and
its value is set to BUNDLE. I can't remember if this is something I
needed to add or if this is a legacy thing that got migrated between
Xcode versions.
And FYI, the guidelines are less clear about the extension for a flat
plugin. Because of this, .so is often chosen to keep things consistent
with other platforms. You can set the executable extension to .so for
this.
You can look at the OpenSceneGraph Xcode project (from stable) to see
how things are set up. It's kind of a monster and there's a lot of
legacy stuff as it has been constantly updated from the early versions
of Xcode. But it works.
http://www.openscenegraph.org
I also recommend you file a bug report with Apple and vote for fixing
this problem. My original bug report ID was 4332769 about the problem
itself (which I think is closed). And 4379857 is the feature request
for an Xcode template to handle this case.
-Eric
From: Marco Bambini <email@hidden>
To: XCode Users <email@hidden>
Date: Tue, 3 Apr 2007 17:45:48 +0200
Subject: From Makefile to XCode
Hi all,
I have a Makefile and I need to convert it to an XCode project,
at the end there is a line like this:
$(CC) -dynamic -flat_namespace -bundle -undefined suppress $
(COMMON_FLAGS) $(LDFLAGS) -o $@ $(EXTRA_LDFLAGS)
the result should be a Mach-O bundle with a dylib extension...
If I select BSD Dynamic Library then I have a lot of issues trying to
convert it to a bundle, on the other hand there isn't a "BSD Bundle"
type project in XCode...
Anyone can help me setting up the right project?
Thanks a lot,
Marco Bambini
_______________________________________________
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