Re: 10.2 deployment issues
Re: 10.2 deployment issues
- Subject: Re: 10.2 deployment issues
- From: Brent Marykuca <email@hidden>
- Date: Mon, 3 Nov 2003 20:29:02 -0800
On Oct 27, 2003, at 9:39 PM, Chris Espinosa wrote:
The other obvious alternative, using the "10.2.7 SDK" setting, gets
me a link failure:
ld: Undefined symbols:
std::basic_streambuf<char, std::char_traits<char>
>::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode)
That's unexpected and I'll look into this.
I've run into this also on our project. Here's what I've found out:
I'm using the following C++ program, created by modifying the main.cpp
in a project created by the New Project Assistant.
#include <iostream>
int main (int argc, const char * argv[]) {
std::ostringstream out;
out.seekp(0);
return 0;
}
Using the 10.3 SDK, the program builds.
Using the 10.2.7 SDK, the link fails with the error quoted above. This
is because the 10.2.7 version of /usr/lib/gcc/darwin/3.3/libstdc++.a
contains this:
0000173c T std::basic_ostream<char, std::char_traits<char>
>::seekp(std::fpos<mbstate_t>)
Versus the 10.3 SDK's version of the same library, which contains this:
00001704 T std::basic_ostream<char, std::char_traits<char>
>::seekp(std::fpos<__mbstate_t>)
So, for some reason the 10.2.7 code wants the "__mbstate_t" version of
seekp. This may be because the compiler is still reading the Panther
version of /usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++config.h
in which _GLIBCPP_HAVE_MBSTATE_T and other wide char capabilities are
declared as being present. (This is not true on Jaguar). You can see
this fairly easily by preprocessing the source file and noting that
c++config.h included by <iostream> is the one from /usr/include and not
the one from the 10.2.7 SDK directory. You can see why by passing -v to
gcc to see the final include path.
So, I corrected the linker error by adding this to my "Header Search
Paths" build setting in my target:
/usr/include/gcc/darwin/3.3/c++/ppc-darwin
Via some Xcode necromancy, that translates to
/Developer/SDKs/MacOSX10.2.7.sdk/usr/include/gcc/darwin/3.3/c++/ppc-
darwin once Xcode gets finished with it. With this header path in
place, the compiler picks up the right c++config.h and all is well from
then on -- at least in the context of this example. Of course, there
are several other paths into /usr/include that probably need to be
overridden to completely eliminate the 10.3 headers from a 10.2.7
build. Exercise for the reader.
Cheers,
Brent Marykuca
Art & Logic
_______________________________________________
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.