Cannot build anymore on Mac OSX

Henrik Brautaset Aronsen subsurface at henrik.synth.no
Sat Jan 19 09:38:09 PST 2013


Henrik Brautaset Aronsen wrote:
> I have included a patch that will update gtk-osx-application in 
> MacPorts to 2.0.1:

Oops, that patch had a slight path problem.  Here's a better patch.

That said, does anyone know why I had to make the following fix?

--- src/cocoa_menu_item.c.old    2013-01-19 17:50:18.000000000 +0100
+++ src/cocoa_menu_item.c    2013-01-19 17:50:49.000000000 +0100
@@ -524,7 +524,7 @@
      DEBUG ("\ta separator\n");
    } else {
      const gchar* text = get_menu_label_text (menu_item, &label);
-    NSString *title = [NSString stringWithUTF8String:(text ? text : @"")];
+    NSString *title = [NSString stringWithUTF8String:(text ? text : "")];

      GClosure *menu_action =
        g_cclosure_new_object_swap(G_CALLBACK(gtk_menu_item_activate),

The syntax is alien to me, and without it I got:

:info:build cocoa_menu_item.c:527:60: error: incompatible operand types 
('const gchar *' (aka 'const char *') and 'NSString *')
:info:build     NSString *title = [NSString stringWithUTF8String:(text ? 
text : @"")];
:info:build                                                            ^ 
~~~~   ~~~

Henrik

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gtk-osx-application-2.0.1.patch
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130119/d0d1cf57/attachment.ksh>


More information about the subsurface mailing list