> I am trying to import some projects into Xcode. I am hoping that I
> will be able to maintain parallel PPC & Intel compilations... Is this
> in fact feasible? That is, can a PPC binary created by Codewarrior and
> a Intel binary created by Xcode be combined into a universal, fat
> binary?
Yep. Though if you're going to migrate the Intel side to Xcode, there's
little benefit and a fair amount of work involved in maintaining a
separate project for the PowerPC side.
> Whether or not such a universal binary is possible, I still need to get
> this body of code to compile on Xcode... and that is giving me
[quoted text clipped - 5 lines]
> long-standing Xcode bug. Are folks merging their code into a few
> locations?
This is an issue that's been fixed a few times and broken a few times in
various Xcode releases. Unfortunately it's broken (at least for paths,
probably not for file names) in Xcode 2.2, but hopefully it'll be fixed
in the next release. Removing the spaces is a good workaround.
> And, what about MSL? Are people succeeding in compiling it on Xcode?
> I have to admit that I am not using any of the unique-to-MSL features
> but, having been with Codewarrior for so long, there is a trust factor.
> How real is the MSL advantage over BSD? What are the pitfalls of that
> conversion?
These days, there's no advantage that I know of to using MSL, whereas
the advantage of using the system's library is that you can use APIs in
Mac OS X that MSL doesn't provide, and you'll end up with a smaller
binary because you don't have to embed your own C runtime.
-Eric

Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/
David Phillip Oster - 04 Dec 2005 15:58 GMT
> These days, there's no advantage that I know of to using MSL, whereas
> the advantage of using the system's library is that you can use APIs in
> Mac OS X that MSL doesn't provide, and you'll end up with a smaller
> binary because you don't have to embed your own C runtime.
But, MSL on OS X is usually built to use the System C library. A more
interesting question is whether to use the Metrowerks C++ library or not.
I was going to write that a huge advantage of MSL was the "debug mode"
where many common errors in the usage of C++ library throw exceptions
rather than just silently running off into the weeds.
<http://groups.google.com/groups?q=_MSL_DEBUG>
especially Howard Hinnant's posting:
<http://groups.google.com/groups?q=STL+Debug+Mode+Tip+24>
but in researching this posting, I was pleased to discover that gcc's
stl also has a debug mode, as documented in:
<http://gcc.gnu.org/onlinedocs/libstdc++/debug.html>
"To use the libstdc++ debug mode, compile your application with the
compiler flag -D_GLIBCXX_DEBUG. Note that this flag changes the sizes
and behavior of standard class templates such as std::vector, and
therefore you can only link code compiled with debug mode and code
compiled without debug mode if no instantiation of a container is passed
between the two translation units."
"The libstdc++ debug mode performs checking for many areas of the C++
standard, but the focus is on checking interactions among standard
iterators, containers, and algorithms, including:
"Safe iterators: Iterators keep track of the container whose
elements they reference, so errors such as incrementing a past-the-end
iterator or dereferencing an iterator that points to a container that
has been destructed are diagnosed immediately.
"Algorithm preconditions: Algorithms attempt to validate their
input parameters to detect errors as early as possible. For instance,
the set_intersection algorithm requires that its iterator parameters
first1 and last1 form a valid iterator range, and that the sequence
[first1, last1) is sorted according to the same predicate that was
passed to set_intersection; the libstdc++ debug mode will detect an
error if the sequence is not sorted or was sorted by a different
predicate."
> Greetings!
>
[quoted text clipped - 3 lines]
> a Intel binary created by Xcode be combined into a universal, fat
> binary?
Yes, if they are both Mach-O. see 'man lipo'