From 040050b8f4e2b70eee892d604fdeab9728ad2443 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 22 Aug 2011 12:38:36 +0000 Subject: [PATCH] Don't export Objective C interfaces in non-x86_64 builds. Doing this is unnecessary and results in compilation errors in PPC and x86 builds when using old (4.0.1) version of the compiler. So make WXEXPORT added in r67575 specific to 64 bit builds. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/cocoa/private.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index a9d77d1fc5..a0a929df8d 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -352,7 +352,22 @@ protected : - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo; @end - WXEXPORT @interface wxNSAppController : NSObject wxOSX_10_6_AND_LATER() + // This interface must be exported in shared 64 bit multilib build but + // using WXEXPORT with Objective C interfaces doesn't work with old (4.0.1) + // gcc when using 10.4 SDK. It does work with newer gcc even in 32 bit + // builds but seems to be unnecessary there so to avoid the expense of a + // configure check verifying if this does work or not with the current + // compiler we just only use it for 64 bit builds where this is always + // supported. + // + // NB: Currently this is the only place where we need to export an + // interface but if we need to do it elsewhere we should define a + // WXEXPORT_OBJC macro once and reuse it in all places it's needed + // instead of duplicating this preprocessor check. +#ifdef __LP64__ + WXEXPORT +#endif // 64 bit builds + @interface wxNSAppController : NSObject wxOSX_10_6_AND_LATER() { } -- 2.45.2