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:
no viable conversion from 'wxString' to 'std::string'
error). How is it even OS specific ?error: use of undeclared identifier 'sample_xpm' : SetIcon(wxICON(sample));
It seems sample_xpm is a default icon that is available on Windows and not MacOS.... (?).Thanks for your help!
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:
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.dc
parameter instead.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.