Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: wxWidget and SFML  (Read 3471 times)

0 Members and 1 Guest are viewing this topic.

dbest

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • http://wow.origo.ethz.ch/
wxWidget and SFML
« 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..

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
wxWidget and SFML
« Reply #1 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.
Laurent Gomila - SFML developer

dbest

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • http://wow.origo.ethz.ch/
wxWidget and SFML
« Reply #2 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.

 

anything