Re: CodeWarrior to XCode
Re: CodeWarrior to XCode
- Subject: Re: CodeWarrior to XCode
- From: Eric Albert <email@hidden>
- Date: Thu, 26 Aug 2004 23:54:05 -0700
On Aug 26, 2004, at 9:22 AM, Calum Robinson wrote:
On 26 Aug 2004, at 15:36, Brad Oliver wrote:
5. Single-precision floating-point functions like acosf, cosf, etc are
not in the standard math library (libm). They are only available in
10.3+, in libmx. A similar situation exists for wchar support.
wchar support was one of the bigger problems we ran into - VS and CW
both use a 2-byte wchar, whereas 10.3 and above have a 4-byte wchar.
Having a wchar_2 type that wchar gets defined as via a macro isn't
enough, as there are wide string constants (L"foo") in some of our
code that the compiler generates as 4-byte wchar strings.
You may want to investigate GCC's -fshort-wchar switch. When it's
turned on, wchar_t is 2 bytes rather than 4. The catch is that, as
with any switch that changes the size of a standard type, it isn't
ABI-compatible. If you enable this, you shouldn't use any system APIs
that use wchar_ts. Fortunately, very few do. You're only likely to
run into them in the STL, and you can work around the problem there by
building your own copy of the STL that's compiled with -fshort-wchar.
8. Dead-code stripping
We haven't tested the dead-code stripping yet, as we only tried to
port to XCode 1.1. It would have been interesting to see the results
using dead-code stripping, as a debug build of one of our larger C++
projects produced an executable (not a bundle - just the Mach-O
executable) that was 600MB in size (it took about 10 minutes on a dual
G5 to load gdb). The CW debug build was ~5MB. At that point we decided
to hold off the XCode porting until dead-code stripping was
implemented :-)
Dead-code stripping might not change this very much for you at all.
(Then again, maybe it will; I'm not an expert on it.) The biggest
reason for the difference in size between debug builds in CodeWarrior
and Xcode is that CodeWarrior stores debug symbols in a separate file
(the .xSYM file), whereas GCC includes the debug symbols in the
executable. That said, dead-code stripping will remove unused symbols,
so if you have enough unused symbols, your resulting executable will be
smaller. But it'll always be much larger than a CodeWarrior-built
executable unless someone adds a separate-symbol-file option to GCC
someday.
Hope this helps,
Eric
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.