diff --git a/cocoa/dlg.h b/cocoa/dlg.h index c4e442e..b84f85d 100644 --- a/cocoa/dlg.h +++ b/cocoa/dlg.h @@ -1,4 +1,14 @@ + +#ifndef DLG_H +#define DLG_H + +#ifndef __has_extension +#define __has_extension(x) 0 +#endif + #include +#include +#include typedef enum { MSG_YESNO, @@ -39,3 +49,5 @@ DlgResult fileDlg(FileDlgParams*); void* NSStr(void* buf, int len); void NSRelease(void* obj); + +#endif diff --git a/cocoa/dlg.m b/cocoa/dlg.m index 2b31dc9..91877cc 100644 --- a/cocoa/dlg.m +++ b/cocoa/dlg.m @@ -1,3 +1,9 @@ + +// fix gcc 11+ macos 14+ +#ifndef __has_extension +#define __has_extension(x) 0 +#endif + #import #include "dlg.h" diff --git a/cocoa/dlg_darwin.go b/cocoa/dlg_darwin.go index f59dd20..e6bf2e4 100644 --- a/cocoa/dlg_darwin.go +++ b/cocoa/dlg_darwin.go @@ -1,8 +1,6 @@ package cocoa // #cgo darwin LDFLAGS: -framework Cocoa -// #include -// #include // #include "dlg.h" import "C"