[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUmakefile and a strange case
From: |
José Pablo Fernández |
Subject: |
Re: GNUmakefile and a strange case |
Date: |
Tue, 26 Dec 2006 13:59:33 -0300 |
User-agent: |
KMail/1.9.5 |
On Tuesday 19 December 2006 21:44, Christopher Armstrong wrote:
> 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).
Yes, I am using NSString directly ([NSString ...]) and indirectly (@"...")
many times as well as other GNUstep classes. And since it is a library I am
using I am liking with it... anything wrong there ?
> > On Monday 18 December 2006 19:49, José Pablo Fernández wrote:
> > > 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).
Ok, thank you.
> > > ?
> > >
> > > Any help in any of these problems is appreciated.
>
> You said you were compiling a "c library".
It used to be a c-only library... now it is a obj-c library.
> This form of a GNUmakefile
> with GNUstep does not link in gnustep-base.
I am not sure what we are talking about really, because...
> You will want to compile as
> a normal library ($(GNUSTEP_MAKEFILES)/library.make).
... that is what I included in my GNUmakefile. My current GNUmakefile looks
like this:
include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME = account
account_OBJC_FILES = Account.m cli.m Group.m LoggedUser.m man.m User.m
account_OBJCFLAGS = -D_GNU_SOURCE -std=gnu99 -pipe -Wall -ggdb
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/library.make
-include GNUmakefile.postamble
> 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.
I can't avoid this. This library is dloaded by another program which loads all
the libraries (modules/plugins) in a certain directory, I have to install my
library there and even name it in a special way (no "lib").
--
José Pablo Fernández
address@hidden