From 6a3681aa82ef868ea628929ae0442f3c6c2ac1f7 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 12 Sep 2024 22:45:55 +0200 Subject: [PATCH] Add APPKIT_EXPORT_CLASS, APPKIT_EXPORT annotations (#288) Some GS* classes and methods are used by the ColorPicker or Printing bundles. That means that they are referenced from an external module. For this module to be able to resolve these symbols, on Windows, they need to be exported. This commit adds `APPKIT_EXPORT_CLASS` and `APPKIT_EXPORT` annotations, allowing ColorPickers to compile on Windows. --- Headers/Additions/GNUstepGUI/GSHbox.h | 1 + Headers/Additions/GNUstepGUI/GSPrintOperation.h | 2 +- Headers/Additions/GNUstepGUI/GSTable.h | 1 + Source/GSGuiPrivate.h | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Headers/Additions/GNUstepGUI/GSHbox.h b/Headers/Additions/GNUstepGUI/GSHbox.h index ca5867c385..8b370ae7bc 100644 --- a/Headers/Additions/GNUstepGUI/GSHbox.h +++ b/Headers/Additions/GNUstepGUI/GSHbox.h @@ -169,6 +169,7 @@ */ +APPKIT_EXPORT_CLASS @interface GSHbox: GSTable { BOOL _haveViews; diff --git a/Headers/Additions/GNUstepGUI/GSPrintOperation.h b/Headers/Additions/GNUstepGUI/GSPrintOperation.h index 430dcc881f..cd5ae3a0c1 100644 --- a/Headers/Additions/GNUstepGUI/GSPrintOperation.h +++ b/Headers/Additions/GNUstepGUI/GSPrintOperation.h @@ -44,7 +44,7 @@ @class NSView; @class NSPrintInfo; - +APPKIT_EXPORT_CLASS @interface GSPrintOperation: NSPrintOperation { } diff --git a/Headers/Additions/GNUstepGUI/GSTable.h b/Headers/Additions/GNUstepGUI/GSTable.h index 0c0377ffca..5f29a7f752 100644 --- a/Headers/Additions/GNUstepGUI/GSTable.h +++ b/Headers/Additions/GNUstepGUI/GSTable.h @@ -171,6 +171,7 @@ */ +APPKIT_EXPORT_CLASS @interface GSTable: NSView { int _numberOfRows; diff --git a/Source/GSGuiPrivate.h b/Source/GSGuiPrivate.h index fa21f18689..78c513a7c3 100644 --- a/Source/GSGuiPrivate.h +++ b/Source/GSGuiPrivate.h @@ -32,6 +32,7 @@ #import #import +#import "AppKit/AppKitDefines.h" #include "GNUstepBase/GSConfig.h" #include @@ -40,7 +41,7 @@ * Should be only used inside the gnustep-gui library. Implemented * in Source/NSApplication.m */ -NSBundle *GSGuiBundle (void); +APPKIT_EXPORT NSBundle *GSGuiBundle (void); /* * Localize a message of the gnustep-gui library.