nbonneel
nbonneel

Reputation: 3326

wxWidgets Windows->MacOS or Linux

I did a C++ code whose GUI is implemented with wxWidgets 3.1, and which I run on Windows. Being a cross-platform solution, I tried compiling the project on MacOS. I'm running into several issues:

Thanks for your help!

Upvotes: 1

Views: 435

Answers (1)

VZ.
VZ.

Reputation: 22753

It would be better to ask separate questions separately, as things risk getting confusing if we try discussing all them together, but here are the basic answers:

  1. wxWindow::SetDoubleBuffered() is not provided in wxOSX because all windows are double-buffered there. A stub for it should still be arguably provided, for portability, but it will still do nothing and not calling it shouldn't result in any flickering.
  2. wxBitmap ctor with this signature is not documented on purpose, it doesn't really make sense for the non-MSW platforms. Just use the ctor without the dc parameter instead.
  3. Conversion from wxString to std::string is not OS-specific but depends on your build options: it is implicitly provided only if you build with wxUSE_STL=1 set in your setup.h (or --enable-stl configure option). To avoid relying on this, you can always use ToStdString() explicitly. Or ensure that you build with the same options under all platforms.
  4. This error is, presumably, in your own code and must be due to not including the XPM file. There is nothing platform-specific about this and you actually usually do not need XPMs under MSW so I'm not sure what you did there -- but just look at how and where do you include it.

Upvotes: 3

Related Questions