Search code examples
c++visual-studio-2017wxwidgets

Will wxwidget 3.1.0 work with Visual Studio 2017


I tried to build the wxWidget library as suggested in the following post

How to set up wxWidgets 3.1.0 with Visual Studio 2015

Just to brief you up, these were the steps mentioned

  1. Grab the sources.
  2. Unpack the sources.
  3. Open VS IDE.
  4. Open \build\msw\wx-vc14.sln (adjust as necessary.)
  5. Go to "Build->Batch Build...", click "Select All", "Build".
  6. Go drink some coffee or watch TV.
  7. After the build finishes, open wxWidgets/samples/minimal/minimal_vc9.sln.
  8. Let MSVC convert the solution to become an appropriate format.
  9. Build and run the sample.

When I clicked on build(Step 5) after selecting all, I got many errors. Is that due to the incompatibility of the wxWidget files with Visual Studio 2017?

This is the error description

As per this description, I am supposed to change the project properties but I am not sure, change Project properties to what? I just need to develop simple Windows app.

I am a newbie to this, I recently completed learning C++ and want to develop some Windows app, so started with wxWidgets.


Solution

  • This is a strange error without an obvious reason, because as far as I've seen "8.1" SDK version is not hard-coded anywhere inside wxWidgets projects.

    To workaround it:

    1. [the same] Open \build\msw\wx-vc14.sln (adjust as necessary.)

      4.1. Select all projects in Solution Explorer (click _custom_build, press Shift, click xrc);

      4.2. Right click on the selected project(s) and choose Properties; on top choose Configuration: All Configurations, Platform: All Platforms and on the left Configuration Properties->General;

      4.3. Windows SDK Version will most probably show 8.1, double-click it and it will choose the 10.x SDK version that came with your VS.

      4.4. Hit OK.

    2. Go to "Build->Build Solution".

    3. Drink less coffee, as it should take less minutes on a multicore.

    4. [the same] After the build finishes, open wxWidgets/samples/minimal/minimal_vc9.sln.

    5. [the same] Let MSVC convert the solution to become an appropriate format.

      8.1. repeat steps 4.2 to 4.4 for the current sample;

    6. [the same] Build and run the sample.

    For what is worth, installing SDK 8.1 (either from VS or standalone) made no difference. I guess there must be a bug somewhere but it's not all that obvious.