SFML community forums

Help => General => Topic started by: dbest on March 14, 2008, 10:18:44 pm

Title: wxWidget and SFML
Post by: dbest on March 14, 2008, 10:18:44 pm
Have been trying to compile some code that would allow me to integrate xWidgets and SFML.

I first tried the sample wxwidget code in the SFML SDK, and added the compiler, linker parameters for wxwidget, and the the sample widget was built. But the application does not execute and an error message comes up: "The application failed to initialize properly. (0xc000005)"

I also tried to work from the sample wxWidget code from their library. I just added sf::RenderWindow to the code
Code: [Select]
class wxtestFrame: public wxFrame, public sf::RenderWindow
to the code and this is the error the compiler threw up:
In member function `virtual bool wxtestApp::OnInit()':
request for member `Show' is ambiguous
candidates are: virtual bool wxWindowBase::Show(bool)
virtual bool wxWindow::Show(bool)
virtual bool wxTopLevelWindowMSW::Show(bool)
void sf::Window::Show(bool)

I am using Code::Blocks with mingw
Any tips guys..
Title: wxWidget and SFML
Post by: Laurent on March 15, 2008, 04:33:35 am
You must explicitely tell which Show you want to use, as it exists in both RenderWindow and wxWindow classes.
Title: wxWidget and SFML
Post by: dbest on March 15, 2008, 07:25:42 am
Thanks Laurent..
Missed something real stupid there.. lol...

I explicitly stated which class should be used there, and the code compiles. Will keep adding the SFML functions to the code now.