gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with libobjc2


From: David Chisnall
Subject: Re: Problem with libobjc2
Date: Fri, 25 Jun 2010 23:36:03 +0100

Hmm, I'm surprised that this works with libobjc2 without producing a linker 
error.  libobjc2 does not contain an Object class, so inheriting from it should 
cause a linker error.

David
 
On 25 Jun 2010, at 23:28, bbceler wrote:

> 
> David this is a simple test program. 
> 
> hello3.m
> ===================
> #include <objc/Object.h>
> 
> @interface Greeter:Object
> {
>  /* This is left empty on purpose:
>  ** Normally instance variables would be declared here,
>  ** but these are not used in our example.
>  */
> }
> 
> - (void)greet;
> 
> @end
> 
> @implementation Greeter
> 
> - (void)greet
> {
>        printf("Hello, World!\n");
> }
> 
> @end
> 
> int main(void)
> {
>        id myGreeter;
>        myGreeter=[Greeter new];
> 
>        [myGreeter greet];
> 
>        [myGreeter free];
>        return 1;
> }
> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Problem-with-libobjc2-tp28990319p28997166.html
> Sent from the GNUstep - Dev mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnustep-dev


-- Sent from my IBM 1620




reply via email to

[Prev in Thread] Current Thread [Next in Thread]