#19159: Compilation fails for macOS target using clang 12
---------------------+-------------------------
Reporter: ancwrd1 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxOSX | Version: dev-latest
Keywords: | Blocked By:
Blocking: | Patch: 0
---------------------+-------------------------
Trying to build wxWidgets for macOS target using clang 12, compilation
fails with the following errors:
{{{
In file included from /wxWidgets/src/osx/cocoa/
appprogress.mm:11:
In file included from /wxWidgets/include/wx/osx/private.h:4:
In file included from /wxWidgets/include/wx/osx/core/private.h:20:
/wxWidgets/include/wx/osx/core/cfstring.h:46:71: error: ObjectiveC object
of type 'WX_NSString' (aka 'NSString *') is bridged to 'CFStringRef' (aka
'const __CFString *'), which is not valid CF object
: wxCFRef< CFStringRef >((WX_OSX_BRIDGE_RETAINED CFStringRef) ref)
^
../SDK/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:463:1:
note: declared here
typedef const struct CF_BRIDGED_TYPE(NSString) __CFString * CFStringRef;
^
In file included from /wxWidgets/src/osx/cocoa/
appprogress.mm:11:
In file included from /wxWidgets/include/wx/osx/private.h:4:
In file included from /wxWidgets/include/wx/osx/core/private.h:20:
/wxWidgets/include/wx/osx/core/cfstring.h:74:72: error: CF object of type
'CFStringRef' (aka 'const __CFString *') is bridged to 'NSMutableString',
which is not an Objective-C class
WX_NSString AsNSString() const { return (WX_OSX_BRIDGE
WX_NSString)(CFStringRef) *this; }
^
../SDK/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:463:1:
note: declared here
typedef const struct CF_BRIDGED_TYPE(NSString) __CFString * CFStringRef;
^
In file included from /wxWidgets/src/osx/cocoa/
appprogress.mm:11:
In file included from /wxWidgets/include/wx/osx/private.h:4:
In file included from /wxWidgets/include/wx/osx/core/private.h:20:
/wxWidgets/include/wx/osx/core/cfstring.h:99:60: error: ObjectiveC object
of type 'NSString *' is bridged to 'CFStringRef' (aka 'const __CFString
*'), which is not valid CF object
return wxCFStringRefFromGet((WX_OSX_BRIDGE CFStringRef)p);
^
../SDK/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:463:1:
note: declared here
typedef const struct CF_BRIDGED_TYPE(NSString) __CFString * CFStringRef;
}}}
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/19159>