Subject: bug#29171: nsterm.m - unnecessary definition

From: Alan Third <[email-masked]>
Date: Mon, 6 Nov 2017 20:08:25 +0000

On Mon, Nov 06, 2017 at 04:13:32PM +0100, Riccardo Mottola wrote:
> for GNUstep, the definition:
> 
> NSString *NSMenuDidBeginTrackingNotification;
> 
> at line 72 of nsterm.m is not needed, actually it results in:

We’re not defining that anywhere in our code, and certainly not on
line 72 of nsterm.m which looks like:

    #ifdef NS_IMPL_COCOA

> nsterm.m:72:18: error: conflicting type qualifiers for
> 'NSMenuDidBeginTrackingNotification'
>  extern NSString *NSMenuDidBeginTrackingNotification;
>                   ^
> In file included from /System/Library/Headers/AppKit/AppKit.h:90:0,
>                  from nsgui.h:34,
>                  from dispextern.h:76,
>                  from nsterm.h:21,
>                  from nsterm.m:48:
> /System/Library/Headers/AppKit/NSMenu.h:823:31: note: previous declaration
> of 'NSMenuDidBeginTrackingNotification' was here APPKIT_EXPORT NSString*
> const NSMenuDidBeginTrackingNotification;
>                                ^
> Makefile:381: recipe for target 'nsterm.o' failed

It looks to me like two different GNUstep headers are defining it.

I can’t reproduce this error myself. What platform are you building on?
-- 
Alan Third