Page 1 of 1

how to use wxWebView in 3.1.2 ubuntu

Posted: Mon Apr 29, 2019 3:54 pm
by valiyuneski
I seem to have a problem using wxWebView in ubuntu 19.04, wxWidgets 3.1.2

auto pWebView = wxWebView::New(this, wxID_ANY, editorURL);

error: incomplete type ‘wxWebView’ used in nested name specifier|

wx-config --libs
-L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk2u_unofficial_xrc-3.1
-lwx_gtk2u_unofficial_html-3.1 -lwx_gtk2u_unofficial_qa-3.1
-lwx_gtk2u_unofficial_core-3.1 -lwx_baseu_unofficial_xml-3.1
-lwx_baseu_unofficial_net-3.1 -lwx_baseu_unofficial-3.1

locally i have the
/usr/lib/x86_64-linux-gnu/libwx_gtk3u_unofficial3_webview-3.1.so

but for some reason it cannot be used ...

Do you have any idea what can i do here ?

Re: how to use wxWebView in 3.1.2 ubuntu

Posted: Mon Apr 29, 2019 4:49 pm
by DavidGH
Hi,

It's a wx3 'feature': wx-config --libs only outputs the standard libs. See https://wiki.wxwidgets.org/Updating_to_ ... fig_script.

For webview, media etc you need either to add their name to the wx-config line or, easier, do
wx-config --libs all.

Regards,

David

Re: how to use wxWebView in 3.1.2 ubuntu

Posted: Mon Apr 29, 2019 5:04 pm
by valiyuneski
auto pWebView = wxWebView::New(this, wxID_ANY, editorURL);

compiles with error:

error: incomplete type ‘wxWebView’ used in nested name specifier

although i have added the wx-config --libs all

regards,
Valentin

Re: how to use wxWebView in 3.1.2 ubuntu

Posted: Mon Apr 29, 2019 5:37 pm
by DavidGH
Ah, I didn't read your question carefully enough; you have >1 problem.

You are currently using the gtk+2 version of wx3.1.2unofficial, and that doesn't supply webview. That's because webview depends on a no-longer-maintained-and-so-unsafe webkitgtk2 package which is not in recent ubuntu versions.

You do also have the gtk+3 wx3.1.2unofficial packages installed which (as you can see) do include webview. It sounds as though you need to switch to using those, either by calling
#> update-alternatives --config wx-config

or by pointing to the correct wx-config in CodeLite's Compiler and Linker settings.