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

Author Topic: Problem with integrating SFML into wxWidgets  (Read 2263 times)

0 Members and 1 Guest are viewing this topic.

neuroticdecay

  • Newbie
  • *
  • Posts: 1
    • View Profile
Problem with integrating SFML into wxWidgets
« on: September 13, 2008, 03:47:42 pm »
Hey,

I'm using the Code::Blocks IDE with the standard GNU GCC Compiler on my WinVista machine. When I build either pure wxWidgets projects or pure SFML projects everything works fine. The problems begin when I try to accomplish the Integrating into wxWidgets tutorial. I always get this error:

Code: [Select]
C:\wxWidgets-2.8.8\include\wx\msw\winundef.h|39|error: cannot convert `const TCHAR*' to `const WCHAR*' for argument `2' to `HWND__* CreateDialogParamW(HINSTANCE__*, const WCHAR*, HWND__*, BOOL (*)(HWND__*, UINT, WPARAM, LPARAM), LPARAM)'|

and several similar ones. By the way: On my linux machine the samples compile fine. First I thought that this error might come from my wxWidgets libs so I recompiled them with the options UNICODE=1 and MONOLITHIC=1 for both release and debug but this didn't change anything.

So if anyone has an idea or hint don't hesitate to share it  :wink:
thx, neuroticdecay

BlackPhoenix

  • Newbie
  • *
  • Posts: 7
    • View Profile
Problem with integrating SFML into wxWidgets
« Reply #1 on: March 05, 2009, 08:47:38 pm »
I get the exact same error too...Can anyone help?

vri

  • Newbie
  • *
  • Posts: 3
    • View Profile
Problem with integrating SFML into wxWidgets
« Reply #2 on: March 13, 2009, 07:24:04 pm »
I've seen posts at the wx forum where problems of this kind were caused by the fact that the wx headers were not included before anything else.
So I'm not sure, but you may want to try to reverse the order of the sfml- and wx include in wxSFMLCanvas.hpp:
#include <wx/wx.h>
#include <SFML/Graphics.hpp>

Please let me know if this helps.

Good luck!
Theo.

 

anything