discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Status of gnustep for gcc-4.6


From: Nicola Pero
Subject: Re: Status of gnustep for gcc-4.6
Date: Wed, 16 Mar 2011 09:41:42 +0100 (CET)

> Does Objective-C++ work? I try g++ from ubuntu's gcc-snapshot

It works to a certain extent, but support for it is not by any means complete.
In particular, Objective-C exceptions in Objective-C++ simply don't work in
GCC 4.6.  That may get fixed in 4.7.

> I try to compile a file.mm
>
> 3Σ_OBJCC_FILES = \
>        AXMath.mm \
>
> Is that all I need in GNUmakefile?

Yes, it's supposed to be.

> g++  -rdynamic      -shared-libgcc -fexceptions -fgnu-runtime -o 3Σ.app/./3Σ 
> [...]
>
> ./obj/3Σ.obj/AXMath.mm.o: In function `_i_AXMath(long long, long long)':
> ...../AXMath.mm:9: undefined reference to
> `objc_msg_lookup(objc_object*, objc_selector const*)'

Presumably the signature of objc_msg_lookup() in the runtime does not match
what the compiler is expecting ?  In C++ the type of arguments does matter
when calling a function.

> If I don't build GS with http://svn.gna.org/svn/gnustep/libs/libobjc2/trunk
> and use /usr/lib/gcc-snapshot/lib/libobjc_gc.so.3  I'll get a warning
> 
> NSLog(@"WARNING your program is becoming multi-threaded, but you are
> using an ObjectiveC runtime library which does not have a thread-safe
> implementation of the +initialize method.  This means that any classes
> not already used may be incorrectly initialised, potentially causing
> strange behaviors and crashes.  Please build/run GNUstep-base with a
> runtime which supports the +initialize method.");

Sure.  That is a known problem - I guess we'll try to get the runtime fix
into 4.6.1.  Having said that, that bug has always existed in the runtime
and most people never noticed it.  If you encounter it, you can work
around it by manually calling a method of the relevant classes at the
beginning of your program.

Thanks




reply via email to

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