What were the specific errors you were getting? I'm travelling, so I don't have access to your past messages on the subject.
Well, linking with just libFoundation (and thus by implication its own version of libobjc), I get the following link errors
/home/marcus/Pike/7.7/build/linux-2.6.22-12-powerpc-ppc/libOCpike.so: undefined reference to `__gnu_objc_personality_v0' /home/marcus/Pike/7.7/build/linux-2.6.22-12-powerpc-ppc/libOCpike.so: undefined reference to `objc_exception_throw'
These symbols exist in /usr/lib/libobjc.so.1 (which is what I would get with -lobjc), but not in /usr/lib/libobjc.so.lf2 (which is what libFoundation pulls in).
The reference to the symbols come from OCPikeInterpreter.o, presumably due to the statement "@throw exception;". It's possible that I need to specify some GCC option when compiling this file to get exceptions which work with libFoundation rather than with libobjc...
If I specify both -lFoundation and -lobjc on the command line, I get both versions of libobjc.so, which satisifes all symbols but is probably not a safe thing to do. And sure enough gcc gives the following warning:
/usr/bin/ld: warning: libobjc.so.lf2, needed by /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/libFoundation.so, may conflict with libobjc.so.1
And when trying to run the resulting binary, I get
You must call +[NSProcessInfo initializeWithArguments:count:environment:] in main()
I tested removing the NSAutoreleasePool stuff to see if that was what was causing it, but it made no difference.
The best way forward is probably trying to figure out the correct way to support exceptions together with libFoundation so that I can get down to just one libobjc... ;-)