6

I've never used wxWidgets before, and I'd love to try it out, but I've run into a million problems getting started.

I am using wxWidgets 2.9.1 on Visual Studio 2010. I've gone through the batch build to build every project in every configuration.

I've added the includes and lib references to my project.

When I try to compile the simple "Hello, World!" program, I get this error:

Error   1   error C1083: Cannot open include file: '../../../lib/vc_lib/msw/wx/setup.h': No such file or directory

I checked my lib/vc_lib folder, and indeed, there was no "msw" folder to be found. There were only "mswu", "mswud", "mswunivu" and "mswunivd".

Anyone know what's going on? :/

Avindra Goolcharan
  • 4,032
  • 3
  • 41
  • 39

3 Answers3

6

First off, you might reconsider WX. I used it, invested a lot of time and code into products based on it, and it just turned out to be not so hot.

The problem you're having is probably due to not having the unicode flags turned on but only having the unicode version. Apparently anyway. So go into your properties and change the character set to unicode. It's on the general properties page.

Edward Strange
  • 40,307
  • 7
  • 73
  • 125
  • 1
    Hmmm... thanks for the response. I'll check out Qt (as per BuschnicK's suggestion below as well), downloading it right now. The windows sdk is 322 mb! I'll let you know how it goes. – Avindra Goolcharan Dec 02 '10 at 02:44
  • For reference by future noobies: http://dcsoft.wordpress.com/2010/01/30/how-to-setup-qt-4-5-visual-studio-integration/ This page is helping me a lot. Hopefully all goes well and I'll have a simple Hello, World compiled in Qt! – Avindra Goolcharan Dec 02 '10 at 04:04
  • Qt is up and running. The process was long (not much effort required, just time), but it was painless and I easily got a Hello, World up and running. Thanks so much, I look forward to playing in Qt! I wanted static libraries, but I accidentally did DLLs (the default). Not a problem, I'll just leave the static libraries to compile when I go to sleep. – Avindra Goolcharan Dec 02 '10 at 06:00
  • If you have a problem with linux, and ask a question about it somewhere, answers like "switch to Windows or Mac" are not appropriate, and anyone else searching for an answer to this is left in the dark. – Bryan Petty Dec 03 '10 at 16:38
  • @Bryan - if you'd bothered to read the answer you'd see that it DOES answer the question asked. If you're still in the dark, it's your own fault. – Edward Strange Dec 03 '10 at 17:30
  • I'm a newbie and welcome suggestions to switching... Qt was a great suggestion and it's simple, fast and to the point. I'll come back to wxWidgets one day, but for now I'm just trying to learn :-) – Avindra Goolcharan Dec 19 '10 at 18:29
3

You have to create that file yourself from a setupin.h (or similar, can't remember) template file. See http://wiki.wxwidgets.org/Setup.H.

But I agree with Noah's reply above: I have written a large commercial wx application over the last five years and I'd never choose wx again. There are just too many bugs, too many feature omissions, a slow patching process and too much cruft in the code. Now that Qt has an acceptable license I'd seriously consider that as an alternative...

BuschnicK
  • 5,304
  • 8
  • 37
  • 49
  • 1
    I'm using Qt right now, translating an ongoing project into Qt because there were just too many insurmountable problems with WX. Qt has some problems too. The signal/slot mechanism is pretty cool, but it's incompatible with just about everything, including templates and the preprocessor! They say that the moc preprocessor and language extensions are a 'good thing', and I would agree if it was a superset instead of subset of the original language. – Edward Strange Dec 01 '10 at 17:12
  • I'm checking out Qt right now. Thanks for the suggestion. I'll let you know if I can compile Qt easily. Just trying to learn here... tired of using C# and .NET languages in general for the inherent overhead and portability issues. – Avindra Goolcharan Dec 02 '10 at 02:45
2

Read the first comment, it gives a better answer.

  • I don't really know what are you trying to say, but the only thing you need to do when building from git is explained in [BuildGit.txt](https://github.com/wxWidgets/wxWidgets/blob/f45c9c773169d800bb310ed769aeb8190a14a494/BuildGit.txt): just copy `include/wx/msw/setup0.h` to `include/wx/msw/setup.h`. You definitely don't need to use configure when using MSVS. – VZ. Dec 18 '15 at 16:12
  • You should put that as an answer not a comment, so people get a better response than switching to qt. – user3658739 Dec 18 '15 at 22:27