Open benjamin-arfa opened 2 years ago
here is the compilation error
In file included from webview.h:448,
from webview.cc:1:
webview_win.h:118:3: error: ‘ICoreWebView2’ does not name a type
118 | ICoreWebView2 *m_webview = nullptr;
| ^~~~~~~~~~~~~
webview_win.h:119:3: error: ‘ICoreWebView2Controller’ does not name a type
119 | ICoreWebView2Controller *m_controller = nullptr;
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:122:74: error: expected class-name before ‘,’ token
122 | : public ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
| ^
webview_win.h:123:73: error: expected class-name before ‘,’ token
123 | public ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
| ^
webview_win.h:124:59: error: expected class-name before ‘,’ token
124 | public ICoreWebView2WebMessageReceivedEventHandler,
| ^
webview_win.h:125:61: error: expected class-name before ‘{’ token
125 | public ICoreWebView2PermissionRequestedEventHandler {
| ^
webview_win.h:126:58: error: ‘ICoreWebView2Controller’ was not declared in this scope
126 | using webview2_com_handler_cb_t = std::function<void(ICoreWebView2Controller *)>;
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:126:84: error: template argument 1 is invalid
126 | using webview2_com_handler_cb_t = std::function<void(ICoreWebView2Controller *)>;
| ^
webview_win.h:130:26: error: ‘webview2_com_handler_cb_t’ has not been declared
130 | webview2_com_handler_cb_t cb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:137:51: error: ‘ICoreWebView2Environment’ has not been declared
137 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res, ICoreWebView2Environment *env) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:144:50: error: ‘ICoreWebView2Controller’ has not been declared
144 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res,ICoreWebView2Controller *controller) {
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:144:31: error: ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’ cannot be overloaded with ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’
144 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res,ICoreWebView2Controller *controller) {
| ^~~~~~
webview_win.h:137:31: note: previous declaration ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’
137 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res, ICoreWebView2Environment *env) {
| ^~~~~~
webview_win.h:160:38: error: ‘ICoreWebView2’ has not been declared
160 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) {
| ^~~~~~~~~~~~~
webview_win.h:160:61: error: ‘ICoreWebView2WebMessageReceivedEventArgs’ has not been declared
160 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:171:38: error: ‘ICoreWebView2’ has not been declared
171 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender,ICoreWebView2PermissionRequestedEventArgs *args) {
| ^~~~~~~~~~~~~
webview_win.h:171:60: error: ‘ICoreWebView2PermissionRequestedEventArgs’ has not been declared
171 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender,ICoreWebView2PermissionRequestedEventArgs *args) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:171:31: error: ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’ cannot be overloaded with ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’
171 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender,ICoreWebView2PermissionRequestedEventArgs *args) {
| ^~~~~~
webview_win.h:160:31: note: previous declaration ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’
160 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) {
| ^~~~~~
webview_win.h:183:5: error: ‘webview2_com_handler_cb_t’ does not name a type; did you mean ‘webview2_com_handler’?
183 | webview2_com_handler_cb_t m_cb;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| webview2_com_handler
webview_win.h: In member function ‘virtual bool webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)’:
webview_win.h:58:38: error: ‘ICoreWebView2Controller’ has not been declared
58 | [&](ICoreWebView2Controller *controller) {
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h: In lambda function:
webview_win.h:59:36: error: ‘m_controller’ was not declared in this scope; did you mean ‘controller’?
59 | m_controller = controller;
| ^~~~~~~~~~~~
| controller
webview_win.h:60:68: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
60 | m_controller->get_CoreWebView2(&m_webview);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual bool webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)’:
webview_win.h:63:35: error: no matching function for call to ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(HWND__*&, webview::msg_cb_t&, webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)::<lambda(int*)>)’
63 | }));
| ^
webview_win.h:129:5: note: candidate: ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(HWND, webview::msg_cb_t, int)’
129 | webview2_com_handler(HWND hwnd, msg_cb_t msgCb,
| ^~~~~~~~~~~~~~~~~~~~
webview_win.h:130:52: note: no known conversion for argument 3 from ‘webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)::<lambda(int*)>’ to ‘int’
130 | webview2_com_handler_cb_t cb)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
webview_win.h:121:9: note: candidate: ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(const webview::edge_chromium::webview2_com_handler&)’
121 | class webview2_com_handler
| ^~~~~~~~~~~~~~~~~~~~
webview_win.h:121:9: note: candidate expects 1 argument, 3 provided
webview_win.h:121:9: note: candidate: ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(webview::edge_chromium::webview2_com_handler&&)’
webview_win.h:121:9: note: candidate expects 1 argument, 3 provided
webview_win.h:55:19: error: ‘CreateCoreWebView2EnvironmentWithOptions’ was not declared in this scope
55 | HRESULT res = CreateCoreWebView2EnvironmentWithOptions(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:75:5: error: ‘ICoreWebView2Settings’ was not declared in this scope
75 | ICoreWebView2Settings* Settings;
| ^~~~~~~~~~~~~~~~~~~~~
webview_win.h:75:28: error: ‘Settings’ was not declared in this scope
75 | ICoreWebView2Settings* Settings;
| ^~~~~~~~
webview_win.h:76:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
76 | m_webview->get_Settings(&Settings);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual void webview::edge_chromium::resize(HWND)’:
webview_win.h:84:9: error: ‘m_controller’ was not declared in this scope
84 | if (m_controller == nullptr) {
| ^~~~~~~~~~~~
webview_win.h:89:5: error: ‘m_controller’ was not declared in this scope
89 | m_controller->put_Bounds(bounds);
| ^~~~~~~~~~~~
webview_win.h: In member function ‘virtual void webview::edge_chromium::navigate(std::string)’:
webview_win.h:94:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
94 | m_webview->Navigate(wurl);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual void webview::edge_chromium::init(std::string)’:
webview_win.h:100:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
100 | m_webview->AddScriptToExecuteOnDocumentCreated(wjs, nullptr);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual void webview::edge_chromium::eval(std::string)’:
webview_win.h:106:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
106 | m_webview->ExecuteScript(wjs, nullptr);
| ^~~~~~~~~
| webview
webview_win.h: In constructor ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(HWND, webview::msg_cb_t, int)’:
webview_win.h:131:43: error: class ‘webview::edge_chromium::webview2_com_handler’ does not have any field named ‘m_cb’
131 | : m_window(hwnd), m_msgCb(msgCb), m_cb(cb) {}
| ^~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’:
webview_win.h:141:12: error: request for member ‘CreateCoreWebView2Controller’ in ‘* env’, which is of non-class type ‘int’
141 | env->CreateCoreWebView2Controller(m_window, this);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’:
webview_win.h:149:19: error: request for member ‘AddRef’ in ‘* controller’, which is of non-class type ‘int’
149 | controller->AddRef();
| ^~~~~~
webview_win.h:151:7: error: ‘ICoreWebView2’ was not declared in this scope
151 | ICoreWebView2 *webview;
| ^~~~~~~~~~~~~
webview_win.h:151:29: error: expected primary-expression before ‘;’ token
151 | ICoreWebView2 *webview;
| ^
webview_win.h:152:9: error: ‘::EventRegistrationToken’ has not been declared
152 | ::EventRegistrationToken token;
| ^~~~~~~~~~~~~~~~~~~~~~
webview_win.h:153:19: error: request for member ‘get_CoreWebView2’ in ‘* controller’, which is of non-class type ‘int’
153 | controller->get_CoreWebView2(&webview);
| ^~~~~~~~~~~~~~~~
webview_win.h:153:44: error: expected primary-expression before ‘)’ token
153 | controller->get_CoreWebView2(&webview);
| ^
webview_win.h:154:14: error: expected primary-expression before ‘->’ token
154 | webview->add_WebMessageReceived(this, &token);
| ^~
webview_win.h:154:46: error: ‘token’ was not declared in this scope
154 | webview->add_WebMessageReceived(this, &token);
| ^~~~~
webview_win.h:155:14: error: expected primary-expression before ‘->’ token
155 | webview->add_PermissionRequested(this, &token);
| ^~
webview_win.h:157:7: error: ‘m_cb’ was not declared in this scope
157 | m_cb(controller);
| ^~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’:
webview_win.h:162:13: error: request for member ‘TryGetWebMessageAsString’ in ‘* args’, which is of non-class type ‘int’
162 | args->TryGetWebMessageAsString(&message);
| ^~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:166:15: error: request for member ‘PostWebMessageAsString’ in ‘* sender’, which is of non-class type ‘int’
166 | sender->PostWebMessageAsString(message);
| ^~~~~~~~~~~~~~~~~~~~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’:
webview_win.h:172:7: error: ‘COREWEBVIEW2_PERMISSION_KIND’ was not declared in this scope
172 | COREWEBVIEW2_PERMISSION_KIND kind;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:173:13: error: request for member ‘get_PermissionKind’ in ‘* args’, which is of non-class type ‘int’
173 | args->get_PermissionKind(&kind);
| ^~~~~~~~~~~~~~~~~~
webview_win.h:173:33: error: ‘kind’ was not declared in this scope
173 | args->get_PermissionKind(&kind);
| ^~~~
webview_win.h:174:19: error: ‘COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ’ was not declared in this scope
174 | if (kind == COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:175:15: error: request for member ‘put_State’ in ‘* args’, which is of non-class type ‘int’
175 | args->put_State(COREWEBVIEW2_PERMISSION_STATE_ALLOW);
| ^~~~~~~~~
webview_win.h:175:25: error: ‘COREWEBVIEW2_PERMISSION_STATE_ALLOW’ was not declared in this scope
175 | args->put_State(COREWEBVIEW2_PERMISSION_STATE_ALLOW);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# github.com/polevpn/webview
In file included from webview.h:448,
from webview.cc:1:
webview_win.h:118:3: error: ‘ICoreWebView2’ does not name a type
118 | ICoreWebView2 *m_webview = nullptr;
| ^~~~~~~~~~~~~
webview_win.h:119:3: error: ‘ICoreWebView2Controller’ does not name a type
119 | ICoreWebView2Controller *m_controller = nullptr;
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:122:74: error: expected class-name before ‘,’ token
122 | : public ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
| ^
webview_win.h:123:73: error: expected class-name before ‘,’ token
123 | public ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
| ^
webview_win.h:124:59: error: expected class-name before ‘,’ token
124 | public ICoreWebView2WebMessageReceivedEventHandler,
| ^
webview_win.h:125:61: error: expected class-name before ‘{’ token
125 | public ICoreWebView2PermissionRequestedEventHandler {
| ^
webview_win.h:126:58: error: ‘ICoreWebView2Controller’ was not declared in this scope
126 | using webview2_com_handler_cb_t = std::function<void(ICoreWebView2Controller *)>;
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:126:84: error: template argument 1 is invalid
126 | using webview2_com_handler_cb_t = std::function<void(ICoreWebView2Controller *)>;
| ^
webview_win.h:130:26: error: ‘webview2_com_handler_cb_t’ has not been declared
130 | webview2_com_handler_cb_t cb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:137:51: error: ‘ICoreWebView2Environment’ has not been declared
137 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res, ICoreWebView2Environment *env) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:144:50: error: ‘ICoreWebView2Controller’ has not been declared
144 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res,ICoreWebView2Controller *controller) {
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:144:31: error: ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’ cannot be overloaded with ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’
144 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res,ICoreWebView2Controller *controller) {
| ^~~~~~
webview_win.h:137:31: note: previous declaration ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’
137 | HRESULT STDMETHODCALLTYPE Invoke(HRESULT res, ICoreWebView2Environment *env) {
| ^~~~~~
webview_win.h:160:38: error: ‘ICoreWebView2’ has not been declared
160 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) {
| ^~~~~~~~~~~~~
webview_win.h:160:61: error: ‘ICoreWebView2WebMessageReceivedEventArgs’ has not been declared
160 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:171:38: error: ‘ICoreWebView2’ has not been declared
171 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender,ICoreWebView2PermissionRequestedEventArgs *args) {
| ^~~~~~~~~~~~~
webview_win.h:171:60: error: ‘ICoreWebView2PermissionRequestedEventArgs’ has not been declared
171 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender,ICoreWebView2PermissionRequestedEventArgs *args) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:171:31: error: ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’ cannot be overloaded with ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’
171 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender,ICoreWebView2PermissionRequestedEventArgs *args) {
| ^~~~~~
webview_win.h:160:31: note: previous declaration ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’
160 | HRESULT STDMETHODCALLTYPE Invoke(ICoreWebView2 *sender, ICoreWebView2WebMessageReceivedEventArgs *args) {
| ^~~~~~
webview_win.h:183:5: error: ‘webview2_com_handler_cb_t’ does not name a type; did you mean ‘webview2_com_handler’?
183 | webview2_com_handler_cb_t m_cb;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| webview2_com_handler
webview_win.h: In member function ‘virtual bool webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)’:
webview_win.h:58:38: error: ‘ICoreWebView2Controller’ has not been declared
58 | [&](ICoreWebView2Controller *controller) {
| ^~~~~~~~~~~~~~~~~~~~~~~
webview_win.h: In lambda function:
webview_win.h:59:36: error: ‘m_controller’ was not declared in this scope; did you mean ‘controller’?
59 | m_controller = controller;
| ^~~~~~~~~~~~
| controller
webview_win.h:60:68: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
60 | m_controller->get_CoreWebView2(&m_webview);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual bool webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)’:
webview_win.h:63:35: error: no matching function for call to ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(HWND__*&, webview::msg_cb_t&, webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)::<lambda(int*)>)’
63 | }));
| ^
webview_win.h:129:5: note: candidate: ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(HWND, webview::msg_cb_t, int)’
129 | webview2_com_handler(HWND hwnd, msg_cb_t msgCb,
| ^~~~~~~~~~~~~~~~~~~~
webview_win.h:130:52: note: no known conversion for argument 3 from ‘webview::edge_chromium::embed(HWND, bool, webview::msg_cb_t)::<lambda(int*)>’ to ‘int’
130 | webview2_com_handler_cb_t cb)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
webview_win.h:121:9: note: candidate: ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(const webview::edge_chromium::webview2_com_handler&)’
121 | class webview2_com_handler
| ^~~~~~~~~~~~~~~~~~~~
webview_win.h:121:9: note: candidate expects 1 argument, 3 provided
webview_win.h:121:9: note: candidate: ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(webview::edge_chromium::webview2_com_handler&&)’
webview_win.h:121:9: note: candidate expects 1 argument, 3 provided
webview_win.h:55:19: error: ‘CreateCoreWebView2EnvironmentWithOptions’ was not declared in this scope
55 | HRESULT res = CreateCoreWebView2EnvironmentWithOptions(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:75:5: error: ‘ICoreWebView2Settings’ was not declared in this scope
75 | ICoreWebView2Settings* Settings;
| ^~~~~~~~~~~~~~~~~~~~~
webview_win.h:75:28: error: ‘Settings’ was not declared in this scope
75 | ICoreWebView2Settings* Settings;
| ^~~~~~~~
webview_win.h:76:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
76 | m_webview->get_Settings(&Settings);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual void webview::edge_chromium::resize(HWND)’:
webview_win.h:84:9: error: ‘m_controller’ was not declared in this scope
84 | if (m_controller == nullptr) {
| ^~~~~~~~~~~~
webview_win.h:89:5: error: ‘m_controller’ was not declared in this scope
89 | m_controller->put_Bounds(bounds);
| ^~~~~~~~~~~~
webview_win.h: In member function ‘virtual void webview::edge_chromium::navigate(std::string)’:
webview_win.h:94:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
94 | m_webview->Navigate(wurl);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual void webview::edge_chromium::init(std::string)’:
webview_win.h:100:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
100 | m_webview->AddScriptToExecuteOnDocumentCreated(wjs, nullptr);
| ^~~~~~~~~
| webview
webview_win.h: In member function ‘virtual void webview::edge_chromium::eval(std::string)’:
webview_win.h:106:5: error: ‘m_webview’ was not declared in this scope; did you mean ‘webview’?
106 | m_webview->ExecuteScript(wjs, nullptr);
| ^~~~~~~~~
| webview
webview_win.h: In constructor ‘webview::edge_chromium::webview2_com_handler::webview2_com_handler(HWND, webview::msg_cb_t, int)’:
webview_win.h:131:43: error: class ‘webview::edge_chromium::webview2_com_handler’ does not have any field named ‘m_cb’
131 | : m_window(hwnd), m_msgCb(msgCb), m_cb(cb) {}
| ^~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’:
webview_win.h:141:12: error: request for member ‘CreateCoreWebView2Controller’ in ‘* env’, which is of non-class type ‘int’
141 | env->CreateCoreWebView2Controller(m_window, this);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(HRESULT, int*)’:
webview_win.h:149:19: error: request for member ‘AddRef’ in ‘* controller’, which is of non-class type ‘int’
149 | controller->AddRef();
| ^~~~~~
webview_win.h:151:7: error: ‘ICoreWebView2’ was not declared in this scope
151 | ICoreWebView2 *webview;
| ^~~~~~~~~~~~~
webview_win.h:151:29: error: expected primary-expression before ‘;’ token
151 | ICoreWebView2 *webview;
| ^
webview_win.h:152:9: error: ‘::EventRegistrationToken’ has not been declared
152 | ::EventRegistrationToken token;
| ^~~~~~~~~~~~~~~~~~~~~~
webview_win.h:153:19: error: request for member ‘get_CoreWebView2’ in ‘* controller’, which is of non-class type ‘int’
153 | controller->get_CoreWebView2(&webview);
| ^~~~~~~~~~~~~~~~
webview_win.h:153:44: error: expected primary-expression before ‘)’ token
153 | controller->get_CoreWebView2(&webview);
| ^
webview_win.h:154:14: error: expected primary-expression before ‘->’ token
154 | webview->add_WebMessageReceived(this, &token);
| ^~
webview_win.h:154:46: error: ‘token’ was not declared in this scope
154 | webview->add_WebMessageReceived(this, &token);
| ^~~~~
webview_win.h:155:14: error: expected primary-expression before ‘->’ token
155 | webview->add_PermissionRequested(this, &token);
| ^~
webview_win.h:157:7: error: ‘m_cb’ was not declared in this scope
157 | m_cb(controller);
| ^~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’:
webview_win.h:162:13: error: request for member ‘TryGetWebMessageAsString’ in ‘* args’, which is of non-class type ‘int’
162 | args->TryGetWebMessageAsString(&message);
| ^~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:166:15: error: request for member ‘PostWebMessageAsString’ in ‘* sender’, which is of non-class type ‘int’
166 | sender->PostWebMessageAsString(message);
| ^~~~~~~~~~~~~~~~~~~~~~
webview_win.h: In member function ‘HRESULT webview::edge_chromium::webview2_com_handler::Invoke(int*, int*)’:
webview_win.h:172:7: error: ‘COREWEBVIEW2_PERMISSION_KIND’ was not declared in this scope
172 | COREWEBVIEW2_PERMISSION_KIND kind;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:173:13: error: request for member ‘get_PermissionKind’ in ‘* args’, which is of non-class type ‘int’
173 | args->get_PermissionKind(&kind);
| ^~~~~~~~~~~~~~~~~~
webview_win.h:173:33: error: ‘kind’ was not declared in this scope
173 | args->get_PermissionKind(&kind);
| ^~~~
webview_win.h:174:19: error: ‘COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ’ was not declared in this scope
174 | if (kind == COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
webview_win.h:175:15: error: request for member ‘put_State’ in ‘* args’, which is of non-class type ‘int’
175 | args->put_State(COREWEBVIEW2_PERMISSION_STATE_ALLOW);
| ^~~~~~~~~
webview_win.h:175:25: error: ‘COREWEBVIEW2_PERMISSION_STATE_ALLOW’ was not declared in this scope
175 | args->put_State(COREWEBVIEW2_PERMISSION_STATE_ALLOW);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am running kubuntu 20.04. My main issue is that I would like to cross compile from linux to windows on the new platforms (win10). The cross compilation worked under webview/webview but is not working anymore under the fork. It seems that the main issue is with cross compilation. should I just move my development for windows, as there is no support for webview2 under linux ?