Author Topic: wxSmith - "wchar_t must be available"  (Read 1752 times)

Offline tonyhibbert

  • Single posting newcomer
  • *
  • Posts: 2
wxSmith - "wchar_t must be available"
« on: September 09, 2016, 02:21:54 pm »
Firstly apologies if this is in the wrong forum.

I have some experience in C++ but I am brand new to trying to make a wxSmith GUI.

I followed some instructions on the internet on how to set it up, so I have;

Installed wxSmith
Set up a project on codeblocks

I tried to build it once it was done, as per the instructions, but I got a wx/setup.h needs to be included message. I found this to be a very common problem and so I found the solution on the internet.

However, now when I build the program I get the following error;

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wall -g -D__WXDEBUG__ -std=c++11 -IC:\wxWidgets-3.1.0\include -I\mswd -IC:\Code_Goes_Here\nearlyobsolete -c C:\Code_Goes_Here\nearlyobsolete\nearlyobsoleteApp.cpp -o obj\Debug\nearlyobsoleteApp.o
In file included from C:\wxWidgets-3.1.0\include/wx/debug.h:17:0,
                 from C:\wxWidgets-3.1.0\include/wx/defs.h:743,
                 from C:\wxWidgets-3.1.0\include/wx/event.h:14,
                 from C:\wxWidgets-3.1.0\include/wx/app.h:19,
                 from C:\Code_Goes_Here\nearlyobsolete\nearlyobsoleteApp.h:13,
                 from C:\Code_Goes_Here\nearlyobsolete\nearlyobsoleteApp.cpp:10:
C:\wxWidgets-3.1.0\include/wx/chartype.h:37:6: error: #error "wchar_t must be available"
     #error "wchar_t must be available"

I have looked to the internet for answers but couldnt find anything useful so I have signed up and posted a question here!

I am using a dell laptop with windows 10. I have codeblocks 16.01 and wxSmith 3.1.0

Thanks in advance

« Last Edit: September 09, 2016, 03:28:19 pm by tonyhibber420 »

Offline rlb

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: wxSmith - "wchar_t must be available"
« Reply #1 on: September 09, 2016, 03:41:47 pm »
Sounds like a missing header file to me. If so, that would be a programming problem and not a Code::Blocks one, but as a first guess, try #include'ing <wchar.h>, or whatever the C++ equivalents is.
Richard Bos

Offline tonyhibbert

  • Single posting newcomer
  • *
  • Posts: 2
Re: wxSmith - "wchar_t must be available"
« Reply #2 on: September 09, 2016, 04:09:45 pm »
Thanks RLB!

The problem is I haven't written any code myself yet, this has all been generated as I set up the wxsmith project! That was my initial thought too, but I don't know where I would put this in!?


Offline stahta01

  • Lives here!
  • ****
  • Posts: 6898
    • My Best Post
Re: wxSmith - "wchar_t must be available"
« Reply #3 on: September 09, 2016, 04:53:01 pm »
How did you get the wxWidgets 3.1.0 binaries?
Edit: If you downloaded the wxWidgets 3.1.0 binaries; please post a link to the download site.

If you built them yourself; what was the build command(s)?

Tim S.
« Last Edit: September 09, 2016, 09:19:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
When in doubt, read the CB WiKi FAQ.