gnustep-dev
[Top][All Lists]
Advanced

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

Re: Getting Objective-C 2.0 working


From: Laurent Michel
Subject: Re: Getting Objective-C 2.0 working
Date: Fri, 18 May 2012 15:09:35 -0400


On May 18, 2012, at 2:40 PM, David Chisnall wrote:

On 18 May 2012, at 18:41, Laurent Michel wrote:

Calling [GSMutableSet -enumerateObjectsUsingBlock:] with incorrect signature.  Method has address@hidden:4^{?=^vii^?}8, selector has address@hidden:address@hidden

This sounds like you did not compile GNUstep with a compiler with blocks support (which also means that you will get exciting things happening if you try subclassing NSRegularExpression).  In this case, GNUstep will fall back to defining the block type as a struct and doing some hackery to invoke the block.

Hmm. That's odd. Everything was compiled with clang and clang++ and linked with gcc

I also uses -fblocks everywhere in my own makefiles. I'll double check just in case.



Try adding -fblocks to the CFLAGS your GNUstep install.

Ok. I'll do that and recompile. That's probably the reason (my own makefile use -fblocks but the GNUstep ones might not).

 This is default on *BSD, but not on some other operating systems.  It should be implicit if you are using the GNU runtime and specify the non-fragile ABI though, so the fact that it isn't implies that yo are using the fragile ABI (which I would recommend against).  Try specifying --disable-mixed-abi (or something like that, try --help to find the correct option) to configure for base.

Good point. My own sources are compiled as follows:

clang -g -I/usr/GNUstep/System/Library/Headers -I. -fblocks -fobjc-nonfragile-abi -c CPFactory.m 

so I already use nonfragile and blocks. But I didn't muck with the GNUstep CFLAGS and I bet that these guys do not have these two options. 

The code runs though. Kudos on the GNUstep libs. Once I figured out (with the list help) the magical makefile, it all compiled cleanly (only this runtime issue left).

Thanks David!

--
  Laurent



David

-- Sent from my Apple II


reply via email to

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