Closed wxtrac closed 14 years ago
osx_ribbon_compilo.patch
(0.4 KiB)(In [61949]) Ribbon compilation fixes for OS X.
Forward declare wxWindow and wxDC classes in wx/ribbon/art.h to avoid errors in (PCH-less?) buildbot builds.
Also include header containing declarations of private Mac functions in implementation file (closes #11203).
I should have been more thorough, Cocoa also doesn't compile because it (by default) doesn't include Carbon/Carbon.h which is also required (in addition to private.h). I'm attaching a patch next.
cocoa_ribbon_compilo.patch
(0.4 KiB)I'll apply this for now to fix the build but I wonder if it's really correct to use Carbon/Carbon.h
from Cocoa build. OTOH wxMacCreateCGColorFromHITheme()
does seem to be defined for both Carbon and Cocoa...
Stefan, could you please look at this to check if we're not doing something stupid here?
TIA!
yes, that's ok, I'm doing it the same way, as I haven't found a neat way to just pull in the header we need because it is deep inside the Carbon Framework, which would work on all SDKs from 10.4
I was hesitant about this myself (I thought any usage of the Carbon Framework ruled out 64-bit GUI apps), but I saw it (conditionally) being included in include/wx/osx/cocoa/private.h so it seemed fine. Sorry for not mentioning it right away.
some carbon APIs that still don't have a counterpart in 64bit cocoa are 64bit capable like HITheme (and below the covers, there are even carbon technologies that are used the for the implementation of the cocoa frameworks eg the menu manager, but these are now private)
This (including the 2nd part) was already applied but somehow not closed.
Stefan: thanks for confirmation, maybe we ought to have some wx wrapper file without "carbon" in its name which could include just the Carbon stuff safe for use in 64 bit code?
yes, I'll just turn it on in the private.h header for cocoa, it's just too often now, and remove the direct include from all places
Issue migrated from trac ticket # 11203
component: old wxOSX/Carbon port | priority: normal | resolution: fixed
2009-09-17 01:13:21: @discnl created the issue
Using a default configure and make resulted in:
../src/ribbon/art_aui.cpp: In constructor 'wxRibbonAUIArtProvider::wxRibbonAUIArtProvider()': ../src/ribbon/art_aui.cpp:41: error: 'kThemeBrushToolbarBackground' was not declared in this scope ../src/ribbon/art_aui.cpp:41: error: 'wxMacCreateCGColorFromHITheme' was not declared in this scope
Attached is a patch adding a missing #include.