Hi > gcc -o account.so -shared Account.os cli.os man.os User.os Group.os > LoggedUser.os -L/usr/lib/GNUstep/System/Library/Libraries -lobjc > -lgnustep-base > scons: done building targets.
Note with this you're linking against the gnustep-base library, which includes the NSString class (the missing export in your error messages). I guess you are making use of NSString somehow (either in the constant (@"") or non-constant form). > > Thanks. > On Monday 18 December 2006 19:49, José Pablo Fernández wrote: > > Hello, > > I have a strange situation here, it used to be a C library compiled with > > SCons, but now I am using ObjC and GNUstep and I was recommended to use > > GNUmakefiles because of the added goodies. > > Now, I need to create a library, the library should be called account.so > > (note, not libaccount.so, account.so) and it should be installed > > on /usr/lib/account/modules/ not on /whatever/Library/whatever. How can I > > do this ? > > Now, this library is dlopened, when I compile it with SCons it is loaded > > succesfully, when I compile it with GNUmakefile (and copy the file by hand > > renaming it in the process) I get this error: > > > > Error loading module 'account.so': /usr/lib/asterisk/modules/account.so: > > undefined symbol: __objc_class_name_NSString > > > > Evidently there's something different in how it was linked with the gnustep > > libraries. > > > > And as a last detail, I get this warnings, what do they mean: > > > > User.m:108: warning: â_OBJC_INSTANCE_0â defined but not used > > User.m:185: warning: â_OBJC_INSTANCE_1â defined but not used > > User.m:194: warning: â_OBJC_INSTANCE_2â defined but not used > > These warnings come with gnustep-base when you use constant strings in the form @"something here" They seem to be harmless, and its a bug in gcc that should be fixed when the gcc guys get round to it (ask them; check their bug reporting system first). > > ? > > > > Any help in any of these problems is appreciated. You said you were compiling a "c library". This form of a GNUmakefile with GNUstep does not link in gnustep-base. You will want to compile as a normal library ($(GNUSTEP_MAKEFILES)/library.make). Please note that what you are doing by putting the library in a different directory is likely to cause problems. The gnustep-base library and the objective-c runtime will somehow need to be in your library export path (ldconfig and friends) for libaccount.so to load properly. For other customisations, I suggest taking a look a the gnustep-makefile manual on GNUstep's web site; it has some options for customising your output. Cheers Chris -- Christopher Armstrong carmstrong ^^AT^ fastmail dOT com /Dot/ au _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
