I think the problem is that the NeXT runtime is different internally from the GNU runtime. Simply generating a shared library won't produce the same result, at least on Darwin. A framework is a "bundle" containing resources, a mach-o bundle, as well as headers and other items. It's a common construct on Darwin; I can't speak for the same with respect to GNUStep. I can state that the code in the example works with the Darwin runtime and frameworks.
A source with .m extension triggers objective-c mode on Darwin, and implies -lobjc and possible -framework Foundation, though it's been a month or two since I worked with this particular code. Additionally, - framework Foundation is required on Darwin to include the base classes (NSAutoreleasePool and NSBundle, for example).
Bill
On Oct 6, 2007, at 12:05 PM, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Linking with -objc solved that, but now I got a 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
Perhaps this can be fixed by removing the dependency on libFoundation?
Also, running the program does not work:
You must call +[NSProcessInfo initializeWithArguments:count:environment:] in main()
(Again this is caused by libFoundation, I think.)
!DSPAM:4707b1d4138347134516841!