Reputation: 13
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
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?
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.
Upvotes: 1
Views: 4236
Reputation: 123
I personally tried the methods mentioned above several times but it failed to build on my VS2017 15.5.2 so I searched and found the best way is that mentioned here, in summary(quote)
Open a "Visual Studio Command Prompt" window shortcut to which must have been installed to the "Start" menu or the "Start" screen by MSVS installation.
Change directory to %WXWIN%\build\msw and type
> nmake /f makefile.vc
to build wxWidgets in the default debug configuration as a static library. You can also do
> nmake /f makefile.vc BUILD=release
to build a release version or
> nmake /f makefile.vc BUILD=release SHARED=1
to build a release DLL version. Finally, you can also add "TARGET_CPU=X64" to nmake command line to build Win64 versions (this only works if you are using a 64 bit compiler, of course).
For x64 build, commands become:
> nmake /f makefile.vc TARGET_CPU=X64
> nmake /f makefile.vc BUILD=release TARGET_CPU=X64
See "Configuring the Build" for more information about the additional parameters that can be specified on the command line.
hope this will help!
Upvotes: 2
Reputation: 1987
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:
[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
.
Go to "Build->Build Solution".
Drink less coffee, as it should take less minutes on a multicore.
[the same] After the build finishes, open wxWidgets/samples/minimal/minimal_vc9.sln.
[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;
[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.
Upvotes: 2