I have recompiled all of my sources with gcc 4.2.1 and when trying to link with a static library that must have been build with an older version of gcc I get some warnings and some "symbol(s) not found" errors.
Using a simple test case I get an error message as follows when linking:
-----
/Developer/usr/bin/g++-4.2 -c -x c++ -arch i386 -m32 -D_RWCONFIG=11s -I/MyDev/ljs_app/trunk/xvt/mac/include test.cpp
/Developer/usr/bin/g++-4.2 -arch i386 -m32 ./test.o /MyDev/ljs_app/trunk/xvt/mac/lib/libtls11s_mac.a -framework Carbon -o ./rw_app
Undefined symbols:
"RWCString::assertElement(unsigned long) const", referenced from:
RWCString::operator[](int)in test.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
-----
When compiling my sources with gcc 4.0 there are no unresolved symbols so I assume it has something to do with the compatibility of gcc 4.2.1 with "older" (static) libraries.
I'm building a i386 and a ppc application and also explicitly using the -m32 option with the compiler and the link.
file on the static library returns:
libtls8s_mac.a: Mach-O universal binary with 2 architectures
libtls8s_mac.a (for architecture ppc): current ar archive
libtls8s_mac.a (for architecture i386): current ar archive
file on a test object I've build from source:
test.o: Mach-O object i386 for i386
test.o: Mach-O object ppc
I do not have the source for the (3rd party) static library so I'm kind of stuck with what I have and any help you be really appreciated.
Thank you,
-D