Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7401889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:35:50+00:00 2026-05-29T04:35:50+00:00

I have installed wxWidgets 2.9.3 on Ubuntu 10.10 using ../configure –with-gtk I am using

  • 0

I have installed wxWidgets 2.9.3 on Ubuntu 10.10 using
../configure --with-gtk
I am using Codeblocks IDE, and ran a sample Dialogs program easily on it.

But when I tried to run my working code on Windows, VS2010 (wxWidgets 2.9.2), I am getting several errors, and runtime failure, listed below

  1. error: ‘class wxBitmap’ has no member named ‘UseAlpha’
  2. error: ‘class wxPanel’ has no member named ‘SetBackgroundBitmap’
  3. Following code, also raises error assert "m_menuItem" failed in Enable(): invalid menu item

    wxMenuItem *undoMenuItem;
    wxMenu* editMenu = new wxMenu(_(""));
    undoMenuItem = new wxMenuItem(editMenu, idMenuUndo, _("&Undo\tCtrl+Z"), _("Undo the last action"));
    undoMenuItem->Enable(false);
    editMenu->Append(undoMenuItem);
    
  4. If I comment out above code, compile and run, I get SIGSEGV and the call stack is

0 0x168f07a cairo_save() (/usr/lib/libcairo.so.2:??)
1 0x806520 wxCairoContext::PushState() () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
2 0x805b38 wxCairoContext::Init(_cairo*) () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
3 0x80736a wxCairoContext::wxCairoContext(wxGraphicsRenderer*, wxMemoryDC const&) () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
4 0x807401 wxCairoRenderer::CreateContext(wxMemoryDC const&) () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
5 0x822f06 wxGraphicsContext::Create(wxMemoryDC const&) () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
6 0x7c54b7 wxGCDCImpl::wxGCDCImpl(wxDC*, wxMemoryDC const&) () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
7 0x7c554e wxGCDC::wxGCDC(wxMemoryDC const&) () (/usr/local/lib/libwx_gtk2u_core-2.9.so.3:??)
8 0x80555fd Breadboard::reset(this=0x81713c0) (/home/vinayak/codes/IConBread/breadboard.cpp:79)
9 0x8054e57 Breadboard::Breadboard(this=0x81713c0) (/home/vinayak/codes/IConBread/breadboard.cpp:17)
10 0x805d7c5 Interface::Interface(this=0x8171200, parent=0x81703e0, width=900, height=570) (/home/vinayak/codes/IConBread/interface.cpp:24)
11 0x8069db4 MainFrame::MainFrame(this=0x8108af8, frame=0x0, title=…) (/home/vinayak/codes/IConBread/mainframe.cpp:127)
12 0x80525a8 Application::OnInit(this=0x80ab228) (/home/vinayak/codes/IConBread/application.cpp:27)
13 0x8053194 wxAppConsoleBase::CallOnInit(this=0x80ab228) (/usr/local/include/wx-2.9/wx/app.h:94)
14 0xc53000 wxEntry(int&, wchar_t**) () (/usr/local/lib/libwx_baseu-2.9.so.3:??)
15 0xc530d7 wxEntry(int&, char**) () (/usr/local/lib/libwx_baseu-2.9.so.3:??)
16 0x805245f main(argc=1, argv=0xbffff924) (/home/vinayak/codes/IConBread/application.cpp:19)

What can be the possible cause of these errors? Remember, on windows (VS2010) this is a perfectly working code.
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:35:52+00:00Added an answer on May 29, 2026 at 4:35 am

    I solved above problems, with help from wxWidgets developers.

    1. UseAlpha is MSW specific, so I can’t use it on Linux
    2. docs/changes.txt suggest
      wxPanel::SetBackgroundBitmap() was removed, derive your class from
      wxCustomBackgroundWindow and use its method with the same name instead.
    3. Appending the item to the menu first, before disabling it, solves the issue.
    4. This issue’s solution has raised more issues, but runtime error is gone.
      I got over the runtime fault, by calling,
      bitmap.Create(kWidth, kHeight, 32);
      before the function which was accessing bitmap object. This line was being called after bitmap was being used, reordering lines solved the problem.
      However I am unable to get transparency with wxGCDC now.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Code::Blocks, and I have installed wxWidgets 2.8. Everything worked ok, I have
I have installed my dependencies using bundle package Then transferred them to the offline
I have installed pyglet onto Mac OS X 10.7.4 using MacPorts. pyglet only works
I have installed Xampp for ubuntu. It is located in /opt/lampp. I want to
We have installed OpenDataKit (ODK) Aggregate and we are using a MySQL Database. I
I have installed Eclipse Indigo on Ubuntu 11.10, and the marketplace is not showing
I have installed Eclipse 3.7.2 via PPA on Ubuntu 12.04 and subsequently I have
I'm trying to write my first cpp program on Windows+Code Blocks. I've installed wxwidgets.
I have installed nginx on Ubuntu 12.04. However, nginx does not seem to follow
I have installed Android SDK and packages. Since I had an error when opening

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.