Hello,
I just upgraded from VS 2015 to 2017 Community Edition and can no longer build wxWidgets from source. I've cloned the git repo and see that there is a wx_vc15.sln, presumably for the latest versions of VS, but when I tried doing a build from that solution I first got errors saying that the Windows 8.1 SDK was not installed. After installing that, I now get lots of errors that standard header files are missing, like this:
5>c:\users\me\data\libs\wxwidgets\src\regex\regcustom.h(32): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (compiling source file ..\..\src\regex\regerror.c)
...
3>..\..\src\expat\lib\xmlparse.c(5): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
I'm not sure how this is possible since these headers should be part of the standard library. I thought maybe my VS installation was borked so I repaired it, but still see the same problem (though it could still be something misconfigured on my system).
Has anyone else run into this issue, or has a pointer to what might be causing it? Any help would be greatly appreciated. Thanks in advance!
building wxWidgets in Visual Studio 2017 Community Edition Topic is solved
Re: building wxWidgets in Visual Studio 2017 Community Edition
Check the VS include paths and that the correct toolset is chosen in the project properties.
Use the source, Luke!
Re: building wxWidgets in Visual Studio 2017 Community Edition
I've seen something similar with VS 2017 and missing Windows SDK version 8.1. I tried installing sdk 8.1 separately and by using VS installer. They both installed succesfully but could not be seen/used by VS. This was very unexpected when installing from VS installer...
Finally I modified all wxW projects to use the SDK of VS 2017 (10.0.14393.0) - [project] Properties -> General -> double click Windows SDK Version. This is uncomfortable because these changes should be ignored when making others, and they needed to be made for All Configurations & All Platforms so they required a lot of clicks...
Finally I modified all wxW projects to use the SDK of VS 2017 (10.0.14393.0) - [project] Properties -> General -> double click Windows SDK Version. This is uncomfortable because these changes should be ignored when making others, and they needed to be made for All Configurations & All Platforms so they required a lot of clicks...
Re: building wxWidgets in Visual Studio 2017 Community Edition
Thanks for your responses!
I expected that the bundled wx .sln file should work "out of the box" and that I shouldn't need to change any paths or other settings. All worked very well in VS 2015 building the latest stable wx release.doublemax wrote:Check the VS include paths and that the correct toolset is chosen in the project properties.
Now that I've installed the 8.1 sdk, I think this is no longer an issue (it does not complain about 8.1 sdk not being found). It is strange that these basic standard include files cannot be found during the build though. I did try right-clicking the solution and doing 'retarget' for sdk 10.x but still run into the same issue, unfortunately. Have you successfully built from source with VS 2017 using the included solution and project files?catalin wrote:I've seen something similar with VS 2017 and missing Windows SDK version 8.1. I tried installing sdk 8.1 separately and by using VS installer. They both installed succesfully but could not be seen/used by VS. This was very unexpected when installing from VS installer...
Finally I modified all wxW projects to use the SDK of VS 2017 (10.0.14393.0) - [project] Properties -> General -> double click Windows SDK Version. This is uncomfortable because these changes should be ignored when making others, and they needed to be made for All Configurations & All Platforms so they required a lot of clicks...
Re: building wxWidgets in Visual Studio 2017 Community Edition
Yes, it should. I'm almost certain that the upgrade from VS2015 to 2017 messed something up. VS is notorious for things like that.I expected that the bundled wx .sln file should work "out of the box" and that I shouldn't need to change any paths or other settings. All worked very well in VS 2015 building the latest stable wx release.
Use the source, Luke!
Re: building wxWidgets in Visual Studio 2017 Community Edition
How did you install it? For me it still complained after installing it in 2 different ways.drmatt wrote:Now that I've installed the 8.1 sdk, I think this is no longer an issue (it does not complain about 8.1 sdk not being found).
Something is indeed strange. However IIRC these build files do not use an explicitly set SDK or paths, but some presets (from env vars? Registry?). I think there is an erroneous (OS?) setting somewhere that fools VS 2017.drmatt wrote:It is strange that these basic standard include files cannot be found during the build though.
Uhm, I thought I did say you should do it for each project. If I didn't then here it goes nowdrmatt wrote:I did try right-clicking the solution and doing 'retarget' for sdk 10.x but still run into the same issue, unfortunately.
I have, but only after changing the SDK to 10.x for each project (all configurations & all platforms).drmatt wrote:Have you successfully built from source with VS 2017 using the included solution and project files?
Re: building wxWidgets in Visual Studio 2017 Community Edition
I installed via the installer from https://developer.microsoft.com/en-us/w ... ws-8-1-sdk.catalin wrote: How did you install it? For me it still complained after installing it in 2 different ways.
catalin wrote: Something is indeed strange. However IIRC these build files do not use an explicitly set SDK or paths, but some presets (from env vars? Registry?). I think there is an erroneous (OS?) setting somewhere that fools VS 2017.
That is certainly possible. I may try to reinstall VS 2017 again. However, I've built a number of other libraries already with this installation and did not run into any errors like this, which is why I'm a bit stumped.doublemax wrote:I'm almost certain that the upgrade from VS2015 to 2017 messed something up. VS is notorious for things like that.
Yes you did! And I did follow your suggestion, however it did not change the include-file-not-found errors or compile failures for any of the projects.catalin wrote: Uhm, I thought I did say you should do it for each project. If I didn't then here it goes now
I'm going to dig into this a little more now but is there anything else I might be missing?
Re: building wxWidgets in Visual Studio 2017 Community Edition
Update: It turns out I had missed two of the projects' properties, and when I retargeted those two, the errors disappeared and the solution built. Your solution was absolutely correct, thank you!
Re: building wxWidgets in Visual Studio 2017 Community Edition
BTW: You can select all projects in a solution and then make the changes, you don't have to do it for every single one individually.
Use the source, Luke!