On 18 Dec 2006, at 22: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 ?

I think you need an extra rule in the makefile to rename/install the library. The standard makefile will build libaccount.so in the obj subdirectory, so your extra install rule needs to copy that to /usr/ lib/account/modules/account.so

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.

Quite possibly, but we would need to see the gnustep make file to know what the problem might be. It should look something like (no promise that this is correct ... just a quick, rough idea from memory):

include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME=account
account_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/library.make
after-install:
                cp obj/libaccount.so /usr/lib/account/modules/account.so


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

That's a harmless compiler bug in some versions of gcc ... best ignored.

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to