Hi,
I'm trying to build the new 3.1.4 version of the wxWidgets lib and following the build steps on https://docs.wxwidgets.org/trunk/classwx_web_view.html i go the build error.
In file included from ../../src/msw/webview_edge.cpp:30:0:
..\..\include/wx/msw/private/webview_edge.h:16:10:fatal error: Webview2.h: No such file or directory
#include <Webview2.h>.
I even tried to copy the file from wxWidgets/3rdparty/webview2 to the include/wx/msw/private but still get the error. Two things came to mind that the file that came with the WebView2 SDK the name is WebViews2.h and not Webviews2.h. The other think is on the build steps it says that visual studio 2015 or newer is required and I have installed the Visual Studio 2019 Preview, so I'm not 100% sure if that one is enough.
Best regards,
Edge (Chromium) backend build errror (3.1.4) Topic is solved
Re: Edge (Chromium) backend build errror (3.1.4)
I have built wxWidgets with that backend using CMake and MSVC 2019 Community with no problems, back when it was first introduced into the master.
I have just tried with MSVC 2017 and 3.1.4 with CMake (I would rather not modify my main setup.h) in 32-bit Debug DLL configuration, following the setup instructions you linked.
Builds and runs the sample just fine Please describe what exactly did you do and how you built wxWidgets (bundled makefile or MSVS solution, CMake...), perhaps you missed a step or made a typo just like in the OP (Webviews2.h)?
My guess would be extracting the nuget package into a wrong folder. WebView2.h and WebView2EnvironmentOptions.h must be in WXWIN\3rdparty\webview2\build\native\include
But I have always used only CMake, so it is possible that the other build options may be broken... I will try using MSVC solution ASAP.
I have just tried with MSVC 2017 and 3.1.4 with CMake (I would rather not modify my main setup.h) in 32-bit Debug DLL configuration, following the setup instructions you linked.
Builds and runs the sample just fine Please describe what exactly did you do and how you built wxWidgets (bundled makefile or MSVS solution, CMake...), perhaps you missed a step or made a typo just like in the OP (Webviews2.h)?
My guess would be extracting the nuget package into a wrong folder. WebView2.h and WebView2EnvironmentOptions.h must be in WXWIN\3rdparty\webview2\build\native\include
But I have always used only CMake, so it is possible that the other build options may be broken... I will try using MSVC solution ASAP.
Re: Edge (Chromium) backend build errror (3.1.4)
I followed the steps on the build, download the SDK, copy it to 3rdparty, enable it in setup.h and the only thing that it may be different from you is that I build the library with the following command
C:\library\wxWidgets-3.1.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1 and not MSVC. I actually only used that command to build the library and never used the MSVC IDE.
C:\library\wxWidgets-3.1.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1 and not MSVC. I actually only used that command to build the library and never used the MSVC IDE.
Re: Edge (Chromium) backend build errror (3.1.4)
Edge backend unfortunately cannot be used with MinGW (same for the the other still unmerged Chromium backend, wxWebViewChromium), the docs clearly states
Visual Studio 2015, or newer, is required
Re: Edge (Chromium) backend build errror (3.1.4)
Btw can you share the cmake build steps as I'm not experienced with it.
Thanks
Thanks
Re: Edge (Chromium) backend build errror (3.1.4)
CMake cannot help you, if you use MinGW (you said you had MSVC 2019 Preview in the OP) you are out of luck.
MSVC required means not just installed, but used to build wxWidgets and the application.
MSVC required means not just installed, but used to build wxWidgets and the application.
Re: Edge (Chromium) backend build errror (3.1.4)
Solved it by switching to visual studio.
Thanks for the support.
Thanks for the support.