Fails to build on macOS < 10.12 (Issue #26472)

26 views
Skip to first unread message

Mohamed Akram

unread,
May 17, 2026, 1:28:09 PM (2 days ago) May 17
to wx-...@googlegroups.com, Subscribed
mohd-akram created an issue (wxWidgets/wxWidgets#26472)

Build System Used

I build wxWidgets and/or my application using:

  • CMake
  • configure
  • mingw32-make with makefile.gcc
  • MSBuild (Microsoft Visual Studio solution file)
  • nmake with makefile.vc
  • Xcode

Description

wxWidgets uses some constants that are not available before 10.12. I get the following error when building on 10.11 and 10.11:

../src/osx/carbon/utilscocoa.mm:295:39: error: use of undeclared identifier 'NSCompositingOperationSourceOver'
        NSCompositingOperation mode = NSCompositingOperationSourceOver;
                                      ^
../src/osx/carbon/utilscocoa.mm:299:24: error: use of undeclared identifier 'NSCompositingOperationClear'
                mode = NSCompositingOperationClear;
                       ^
../src/osx/carbon/utilscocoa.mm:302:24: error: use of undeclared identifier 'NSCompositingOperationCopy'
                mode = NSCompositingOperationCopy;
                       ^
../src/osx/carbon/utilscocoa.mm:305:24: error: use of undeclared identifier 'NSCompositingOperationSourceOver'
                mode = NSCompositingOperationSourceOver;
                       ^
../src/osx/carbon/utilscocoa.mm:308:24: error: use of undeclared identifier 'NSCompositingOperationSourceIn'
                mode = NSCompositingOperationSourceIn;
                       ^
../src/osx/carbon/utilscocoa.mm:311:24: error: use of undeclared identifier 'NSCompositingOperationSourceOut'
                mode = NSCompositingOperationSourceOut;
                       ^
../src/osx/carbon/utilscocoa.mm:314:24: error: use of undeclared identifier 'NSCompositingOperationSourceAtop'
                mode = NSCompositingOperationSourceAtop;
                       ^
../src/osx/carbon/utilscocoa.mm:317:24: error: use of undeclared identifier 'NSCompositingOperationDestinationOver'; did you mean 'NSCompositeDestinationOver'?
                mode = NSCompositingOperationDestinationOver;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       NSCompositeDestinationOver
/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:27:5: note: 'NSCompositeDestinationOver' declared here
    NSCompositeDestinationOver, 
    ^
../src/osx/carbon/utilscocoa.mm:320:24: error: use of undeclared identifier 'NSCompositingOperationDestinationIn'; did you mean 'NSCompositeDestinationIn'?
                mode = NSCompositingOperationDestinationIn;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       NSCompositeDestinationIn
/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:28:5: note: 'NSCompositeDestinationIn' declared here
    NSCompositeDestinationIn,   
    ^
../src/osx/carbon/utilscocoa.mm:323:24: error: use of undeclared identifier 'NSCompositingOperationDestinationOut'; did you mean 'NSCompositeDestinationOut'?
                mode = NSCompositingOperationDestinationOut;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       NSCompositeDestinationOut
/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:29:5: note: 'NSCompositeDestinationOut' declared here
    NSCompositeDestinationOut,  
    ^
../src/osx/carbon/utilscocoa.mm:326:24: error: use of undeclared identifier 'NSCompositingOperationDestinationAtop'; did you mean 'NSCompositeDestinationAtop'?
                mode = NSCompositingOperationDestinationAtop;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       NSCompositeDestinationAtop
/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:30:5: note: 'NSCompositeDestinationAtop' declared here
    NSCompositeDestinationAtop, 
    ^
../src/osx/carbon/utilscocoa.mm:329:24: error: use of undeclared identifier 'NSCompositingOperationExclusion'
                mode = NSCompositingOperationExclusion; // Not NSCompositingOperationXOR!
                       ^
../src/osx/carbon/utilscocoa.mm:332:24: error: use of undeclared identifier 'NSCompositingOperationPlusLighter'; did you mean 'NSCompositePlusLighter'?
                mode = NSCompositingOperationPlusLighter ;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       NSCompositePlusLighter
/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:34:5: note: 'NSCompositePlusLighter' declared here
    NSCompositePlusLighter,
    ^
../src/osx/carbon/utilscocoa.mm:335:24: error: use of undeclared identifier 'NSCompositingOperationDifference'
                mode = NSCompositingOperationDifference ;
                       ^
../src/osx/carbon/utilscocoa.mm:338:24: error: use of undeclared identifier 'NSCompositingOperationSourceOver'
                mode = NSCompositingOperationSourceOver;

Platform and version information

  • wxWidgets version you are building: 3.2.10
  • wxWidgets port you are building: wxOSX
  • OS and its version: macOS 10.10, 10.11
  • Compiler being used: clang
  • Non-default compiler options, if any :


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26472@github.com>

VZ

unread,
May 17, 2026, 2:43:00 PM (2 days ago) May 17
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26472)

These constants were added by 393b575 (Respect composition mode in wxOSX wxGraphicsContext::DrawBitmap(), 2023-02-09), i.e. back in 3.2.3. Not sure if we can provide a reasonable workaround for older SDKs or just officially declare 10.11 and lower unsupported.

@csomor Any thoughts?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26472/4472135180@github.com>

Stefan Csomor

unread,
May 17, 2026, 3:03:36 PM (2 days ago) May 17
to wx-...@googlegroups.com, Subscribed
csomor left a comment (wxWidgets/wxWidgets#26472)

@vadz they have a different name < 10.12 ie NSCompositePlusLighter is new NSCompositingOperationPlusLighter, I didn't check this, I'll prepare a patch


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26472/4472181402@github.com>

Stefan Csomor

unread,
May 18, 2026, 2:20:52 AM (yesterday) May 18
to wx-...@googlegroups.com, Subscribed
csomor left a comment (wxWidgets/wxWidgets#26472)

@mohd-akram could you please test with the change of the PR, they are for master but it's simple, just copy them to the same place in your working directory. Thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26472/4474907429@github.com>

Mohamed Akram

unread,
May 18, 2026, 1:06:16 PM (13 hours ago) May 18
to wx-...@googlegroups.com, Subscribed
mohd-akram left a comment (wxWidgets/wxWidgets#26472)

@csomor The patch worked and the build progressed further. But I got another error later on, it seems there's one more place that needs a patch:

./src/osx/cocoa/taskbar.mm:398:67: error: use of undeclared identifier 'NSCompositingOperationSourceOver'


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26472/4479989126@github.com>

Stefan Csomor

unread,
May 18, 2026, 2:01:57 PM (12 hours ago) May 18
to wx-...@googlegroups.com, Subscribed
csomor left a comment (wxWidgets/wxWidgets#26472)

@mohd-akram thanks, ok, I have moved them to the private header now, that way they can be used from all macOS implementation files


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26472/4480436739@github.com>

Reply all
Reply to author
Forward
0 new messages