webview / webview_go

Go language bindings for the webview library.
MIT License
176 stars 27 forks source link

Can't get code to compile #10

Closed precisionpete closed 9 months ago

precisionpete commented 9 months ago

I finally figured out that my Go project was failing due to the bindings being moved to webview_go... But I now have no idea what to do with the following message.

Are there any new docs still in the works? Please advise...

../../../go/pkg/mod/github.com/webview/webview_go@v0.0.0-20230901181450-5a14030a9070/libs/webview/include/webview.h: In member function ‘void webview::detail::gtk_webkit_engine::eval(const string&)’:
../../../go/pkg/mod/github.com/webview/webview_go@v0.0.0-20230901181450-5a14030a9070/libs/webview/include/webview.h:617:35: warning: ‘void webkit_web_view_run_javascript(WebKitWebView*, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer)’ is deprecated: Use 'webkit_web_view_evaluate_javascript' instead [-Wdeprecated-declarations]
  617 |     webkit_web_view_run_javascript(WEBKIT_WEB_VIEW(m_webview), js.c_str(),
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  618 |                                    nullptr, nullptr, nullptr);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/webkitgtk-4.0/webkit/WebKitPrintOperation.h:29,
                 from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:72,
                 from ../../../go/pkg/mod/github.com/webview/webview_go@v0.0.0-20230901181450-5a14030a9070/libs/webview/include/webview.h:510,
                 from webview.cc:1:
/usr/include/webkitgtk-4.0/webkit/WebKitWebView.h:526:1: note: declared here
  526 | webkit_web_view_run_javascript                       (WebKitWebView             *web_view,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SteffenL commented 9 months ago

Which error messages are you seeing if you're still having compilation issues?

Regarding the warning, I'll refer you here:

SteffenL commented 9 months ago

I'll close this but if you have anything more to add then feel free to comment.

precisionpete commented 9 months ago

I am on Mint 21.2 which is 22.04.

It was just the warnings. Am I correct in assuming it's safe to ignore the warnings until the library gets updated?

SteffenL commented 9 months ago

All right. I suggest ignoring the warning for now. Fixing this would be ideal but simply updating the library to use the new API is problematic because it means to toss out compatibility for slightly older Linux distros.