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 / January 2004



Tip: Looking for answers? Try searching our database.

Several questions about CW compatibility and etc.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
[..'] Yon - 25 Dec 2003 07:23 GMT
Hi,

I have questions about CW, most of which are trivial and thus just for my
curiosity.
But I hope there're some people who have knowledge, some free time and good
will... ;-)

On Mac OS X,

1. Why are the libraries and pre-compiled headers are needed to be rebuilt
everytime CW is updated? Does this mean I have to obtain new versions of
3rd-party libs of which I don't have access to the source codes whenever the
CW is updated?

2. Can I use libs built with gcc (or other build tools) with CW and vice
versa?

3. Can CW build an application or static/dynamic libs without using MSL and
Metrowerks' runtime lib? If so, what are the names and location of the C lib
and runtime lib?

4. How good is MW C/C++ Compiler at optimizations, especially compared to
apple-gcc? I heard MW C compiler is very generic.

Thanks in advance.
Frederick Cheung - 25 Dec 2003 10:06 GMT
> But I hope there're some people who have knowledge, some free time and good
> will... ;-)
[quoted text clipped - 5 lines]
> 3rd-party libs of which I don't have access to the source codes whenever the
> CW is updated?
The pre compiled headers you use need to match the actual headers. Updates
to cw often modify these and/or the source to msl, hence the need to
rebuild these. A 3rd party lib does not need to be rebuilt

> 2. Can I use libs built with gcc (or other build tools) with CW and vice
> versa?
I have.

> 3. Can CW build an application or static/dynamic libs without using MSL and
> Metrowerks' runtime lib? If so, what are the names and location of the C lib
> and runtime lib?

I use the BSD layer c library, In CW 9 there is project stationary for
this

> 4. How good is MW C/C++ Compiler at optimizations, especially compared to
> apple-gcc? I heard MW C compiler is very generic.
Don't know about this.

Fred

> Thanks in advance.
Thorrsten Froehlich - 25 Dec 2003 13:36 GMT
> 1. Why are the libraries and pre-compiled headers are needed to be rebuilt
> everytime CW is updated?

Keep in mind that you have to recompile precompiled headers whenever
something in the headers that are included in the precompiled header
changed. So, if an update of CW also updated some MSL or runtime
headers or code, you have to rebuild those libraries. In the past
Metrowerks occasionally included changed libraries in updates, making
the updates huge and thus hard to download for those without fast
internet connections.

> Does this mean I have to obtain new versions of
> 3rd-party libs of which I don't have access to the source codes whenever the
> CW is updated?

The general answer is no. However, if the name mangling rules are
tweaked by Apple (as it happened in the past for Mach-O due to
problems in early versions of Mac OS X), you may need different
libraries.

> 2. Can I use libs built with gcc (or other build tools) with CW and vice
> versa?

If you could not, you could not link to any system libraries, could
you? :-)

> 3. Can CW build an application or static/dynamic libs without using MSL and
> Metrowerks' runtime lib? If so, what are the names and location of the C lib
> and runtime lib?

You don't have to use MSL. What you need to do depends on the version
of CW you are talking about. However, unless you have to for some
reason, I would recommend to stick to MSL, which is IMHO much more
reliable than the gcc C libraries.

> 4. How good is MW C/C++ Compiler at optimizations, especially compared to
> apple-gcc? I heard MW C compiler is very generic.

Unless you and I have a different definition of "generic", you have it
the wrong way around. CW is the compiler usally generating the fastest
code and compiling fastest on Mac OS  and Mac OS X (any version),
while gcc is a slow big hog generating slow code most of the time
(also it has been getting a bit better with every new Mac OS X version
so far) because it is the "generic" compiler that also runs on many,
many of other platforms...

   Thorsten
[..'] Yon - 26 Dec 2003 05:08 GMT
First of all, thanks a lot for your insightful comments.

> > 4. How good is MW C/C++ Compiler at optimizations, especially compared to
> > apple-gcc? I heard MW C compiler is very generic.
[quoted text clipped - 6 lines]
> so far) because it is the "generic" compiler that also runs on many,
> many of other platforms...

True, and I heard that gcc is best at none. However, since mw c compiler is
two-phase compiler, I suspect that approach, which enables the mw compilers
to be available for so many platforms, could be somewhat less efficient for
optimizing code for a specific platform. That's why asked this question. Any
comment?

Codewarrior was the best because it was much faster and easier to use than
MPW, and more rapidly evolved than Think C. But my latest copy is pro 4, so
I don't know how good it is today.
Thorrsten Froehlich - 26 Dec 2003 11:56 GMT
> True, and I heard that gcc is best at none. However, since mw c compiler is
> two-phase compiler, I suspect that approach, which enables the mw compilers
> to be available for so many platforms, could be somewhat less efficient for
> optimizing code for a specific platform. That's why asked this question. Any
> comment?

As said, there is no general answer, but for most people (including
me) code generated by CodeWarrior is still faster than gcc code, but
of course this may well depend on the specific application.
CodeWarrior's optimiser is definetly able to get a whole lot out of a
PowerPC, at least as far as integer performance is concerned. This is
noticeable with most image/video compression algorithms which require
a whole lot of manual tweaking to be fast on x86 even when using
Intel's compiler there. At least that is my experience.

  Thorsten
Lawrence D¹Oliveiro - 27 Dec 2003 10:53 GMT
In article
<WmPGb.88706$2We1.48534@news04.bloor.is.net.cable.rogers.com>,

>Codewarrior was the best because it was much faster and easier to use than
>MPW...

Not in my experience. MPW did basic things (like starting up and opening
windows) so much quicker than CodeWarrior. Also I think Apple's MrC
generated better code than CodeWarrior.
MW Ron - 06 Jan 2004 00:49 GMT
In article
<WmPGb.88706$2We1.48534@news04.bloor.is.net.cable.rogers.com>,

>True, and I heard that gcc is best at none. However, since mw c compiler is
>two-phase compiler, I suspect that approach, which enables the mw compilers
>to be available for so many platforms, could be somewhat less efficient for
>optimizing code for a specific platform. That's why asked this question. Any
>comment?

Not true,  there are two phases of optimization, one is done by the
Intermediate representation phase,  it parses the  code optimizing it
for loops inlining and stuff like this  (global optimizations)  there
then is a back end which optimizes for the processor

>Codewarrior was the best because it was much faster and easier to use than
>MPW, and more rapidly evolved than Think C. But my latest copy is pro 4, so
>I don't know how good it is today.

We still do better code and do it faster than XCode using GCC.   We dead
strip code etc.  Although Apple has made great strides it is still not
as good as CodeWarrior.

Sorry I wasn't around over the holidays to get to this sooner.

Ron

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

 
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



©2009 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.