Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / December 2005



Tip: Looking for answers? Try searching our database.

Questions around 'Dual-compiler' life

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Stuller - 04 Dec 2005 03:22 GMT
Greetings!

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?

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
headaches.  It seems as tho the import of access paths is the weakest
link in the importation chain.  How are folks coping with the apparent
deficits in Xcode around access paths?  Removing all spaces from folder
names?If so, does that include file names?  I keep seeing the quotes
disappear from around paths with spaces... I gather this is a
long-standing Xcode bug.  Are folks merging their code into a few
locations?

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?

(I'd really rather be delivering new features to the customers!)

Peace,
Bob

Chop wood, carry water.
  - zen saying

--
Eric Albert - 04 Dec 2005 07:11 GMT
> 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."
Sean McBride - 06 Dec 2005 02:25 GMT
> 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'
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.