Open MerijnHendriks opened 4 years ago
Use: script/build.bat This works for me. If you want to build within VS then you need to use the same build settings. Make sure you have the correct defines set.
In VS2019, this is what I had to do:
_CRT_SECURE_NO_WARNINGS;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;WEBVIEW_API=__declspec(dllexport)
UNICODE;_UNICODE;
webview
repo):
..\..\webview;..\..\webview\script\microsoft.web.webview2.1.0.664.37\build\native\include;
..\..\webview\script\microsoft.web.webview2.1.0.664.37\build\native\$(PlatformShortName)
webview.dll
and WebView2Loader.dll
to the application .EXE location (or somewhere in the path)I hope I didn't miss anything out. If I didn't, this ought to work.
What OS are you using (
uname -a
, or Windows version)?Windows 10 Enterprise LTSC (2019) Version: 1809
What programming language are you using (C/C++/Go/Rust)?
Visual Studio 2017 Community (C++ workload) VS2017 version: 15.9.24 VC++ version: 15.9 v14.16 Win10 SDK: 10.0.15063.0
What did you expect to see and what you saw instead?
I wanted to build a basic C++ project containing webview.h, webview.cc and main.cc (provided in the master branch) using Visual Studio I expected to build it without issues. However, this is not the case. There are too many errors to track down the issue.
What am I doing wrong? Are there instructions how to build it using visual studio? I checked the readme and the wiki, but no information on this was provided.
I cannot use MinGW / Clang / Cygwin / other tools than visual studio and MSBuild due to the company's policies.