On Fri, Apr 18, 2008 at 5:16 PM, Mark Thomas <[EMAIL PROTECTED]> wrote:

> >
> >> Hi All,
> >>  Does anybody know how to stop the STL string class including any
> unicode
> >> support, as we are compiling a .dylib with Xcode 2.2.1 on 10.4, but
> when
> >> the
> >> library loads on a 10.2 system we are getting linker errors because of
> the
> >> lack of wchar support on 10.2.x.
> >
> >
> > What are the errors? And, what compiler version are you using? Binaries
> > built with g++ 4 require 10.3.9 or newer; to support 10.2, you must use
> g++
> > 3.3 instead, as documented here:
> >
> >     <
> >
> http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_devel
> > opment/HowItWorks/chapter_2_section_9.html
> >>
>   Yes I am using gcc 3.3, which is setting via GCC_VERSION_ppc flag within
> the Xcode project (universal settings), which builds fine. There are no
> problems building the .dylib because I'm using a 10.4.x system, I have set
> the deploy target to 10.2, but that seems only to matter for frameworks
> not
> system libs.
>
>  I'm getting undefined symbols for
>
>         U _wcscoll
>         U _wcsftime
>         U _wcslen
>         U _wcsrtombs
>         U _wcsxfrm
>         U _wctob
>         U _wctype
>
>  which I understand aren't present on 10.2.x, when the .dylib tries to
> load.


Have you tried using STLport instead of g++'s own STL? I haven't went down
that path yet, so I can't say how much pain is entailed in using STLport. It
may, however, give you working wstrings on 10.2.

    <http://stlport.sourceforge.net/>

You could use the macros from Availability.h to conditionally create your
own string type that's typedef'd as whichever of string or wstring is
appropriate for the current SDK and deployment target.

Can your app use any features that are only found in 10.3 or newer, such as
Bonjour, aka The Service Formerly Known as Rendezvous? If not, you could set
SDKROOT_ppc to point to the 10.3 SDK. This would limit the options available
to your app, but it wouldn't require any code changes.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to