Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Nightly r12709 is broken macOS
(1/1)
steve123:
I attempted to compile the r12709 nightly and encountered the following build error when compiling on macOS 11.6.2. It appears a recent change is incorrectly using GetBitmapFor(). That particular function is a member of wxBitmapBundle, not wxBitmap?
BTW, I am new here, is there a code tags feature for this forum editor? I couldn't find one so I just pasted the text output below without using code tags.
clang++ -DHAVE_CONFIG_H -I. -I../../src/include -I/Users/stevenslupsky/Documents/source/codeblocks-r12709/install_dir/lib/wx/include/osx_cocoa-unicode-3.1 -I/Users/stevenslupsky/Documents/source/codeblocks-r12709/install_dir/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../../src/include/scripting/include -I../../src/sdk/wxscintilla/include -I../../src/include -DCB_AUTOCONF -stdlib=libc++ -DCB_PRECOMP -DPIC -I../../src/include/tinyxml -DTIXML_USE_STL=YES -stdlib=libc++ -std=c++14 -Winvalid-pch -fPIC -fexceptions -MT printdlg.o -MD -MP -MF $depbase.Tpo -c -o printdlg.o printdlg.cpp &&\
mv -f $depbase.Tpo $depbase.Po
notebookstyles.cpp:130:40: error: no member named 'GetBitmapFor' in 'wxBitmap'
const wxBitmap bmp(page.bitmap.GetBitmapFor(wnd));
~~~~~~~~~~~ ^
notebookstyles.cpp:179:36: error: no member named 'GetBitmapFor' in 'wxBitmap'
bmp = m_activeCloseBmp.GetBitmapFor(wnd);
~~~~~~~~~~~~~~~~ ^
notebookstyles.cpp:181:38: error: no member named 'GetBitmapFor' in 'wxBitmap'
bmp = m_disabledCloseBmp.GetBitmapFor(wnd);
~~~~~~~~~~~~~~~~~~ ^
notebookstyles.cpp:316:40: error: no member named 'GetBitmapFor' in 'wxBitmap'
const wxBitmap bmp(page.bitmap.GetBitmapFor(wnd));
~~~~~~~~~~~ ^
notebookstyles.cpp:364:36: error: no member named 'GetBitmapFor' in 'wxBitmap'
bmp = m_activeCloseBmp.GetBitmapFor(wnd);
~~~~~~~~~~~~~~~~ ^
notebookstyles.cpp:366:38: error: no member named 'GetBitmapFor' in 'wxBitmap'
bmp = m_disabledCloseBmp.GetBitmapFor(wnd);
~~~~~~~~~~~~~~~~~~ ^
6 errors generated.
make[3]: *** [notebookstyles.o] Error 1
Miguel Gimenez:
That code is compiled only if you are using wxWidgets 3.1.6 or newer:
--- Code: ---#if wxCHECK_VERSION(3, 1, 6)
if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) ||
(close_button_state == wxAUI_BUTTON_STATE_PRESSED))
bmp = m_activeCloseBmp.GetBitmapFor(wnd);
else
bmp = m_disabledCloseBmp.GetBitmapFor(wnd);
#else
if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) ||
(close_button_state == wxAUI_BUTTON_STATE_PRESSED))
bmp = m_activeCloseBmp;
else
bmp = m_disabledCloseBmp;
#endif
--- End code ---
EDIT: Probably you must update wxWidgets to a recent (< 1 month) version or use wx3.1.5 (better option). wxBitmapBundle was added about 4 months ago.
steve123:
Yes, I have 3.1.6 installed and it breaks because GetBitmapFor() is actually a member of wxBitmapBundle, not wxBitmap. So, the usage is incorrect.
For the time begin, I just replace
#if wxCHECK_VERSION(3, 1, 6)
with
#if (0)
to disable this code. It compiles and appears to run ... though it crashed when I closed the app.
Miguel Gimenez:
3.1.6 is still a work-in-progress, not a release.
The usage is not incorrect, you need to pull a snapshot newer than this commit from 14-Nov-2021.
steve123:
Ahh, I see that commit addresses this. Thank you for the tip.
Navigation
[0] Message Index
Go to full version