Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
BeerSmith
Knows some wx things
Knows some wx things
Posts: 27
Joined: Mon Mar 07, 2011 8:39 pm

Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Post by BeerSmith »

The release notes for wxWidgets 3.0.4 has the following note in it:
In wxGTK:
- Allow using more recent WebKit2GTK+ in wxWebView (Scott Talbert).
I'm trying very hard to get wxWidgets compiled without using the old libwebkit-1.0 library which many platforms no longer support. So I'm trying to configure and compile wx with the newer libwebkit2gtk-4.0-dev package.

However, if I try a configure without the 1.0 version of webkit installed using something like this:

Code: Select all

configure --disable-shared --enable-debug --enable-webview
It fails to configure with the "WARNING: webkitgtk not found" and "WebKit not available, disabling wxWebView".

I found a few references in the configure file to the new libwebkit2gtk-4.0 package but I can't for the life of me figure out how to configure and compile wxwidgets with any version of webkit2gtk

Any and all help is appreciated!

Brad
BeerSmith.com
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Post by DavidHart »

Hi,

AFAIK you just need libwebkitgtk-dev and its dependencies.

If I'm wrong and configure still complains, ${build-dir}/config.log should tell you more.

Regards,

David
BeerSmith
Knows some wx things
Knows some wx things
Posts: 27
Joined: Mon Mar 07, 2011 8:39 pm

Re: Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Post by BeerSmith »

DavidHart wrote:AFAIK you just need libwebkitgtk-dev and its dependencies.
I just tried that and unfortunately that configures it to build with the libwebkitgtk-1.0 build, which is obsolete on most LInux systems. The libwebkitgtk-dev build is apparently 1.0 based and in fact it downloads the 1.0 library when I install libwebkitgtk-dev.

As I mentioned - still trying to find a way to build the libwebkit2gtk-4.0-dev build or any modern libwebkit2gtk build as mentioned in the wx 3.0.4 build notes, but the only way I've been able to get it to build at all is with the 1.0 baseline.

Brad
BeerSmith.com
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Post by DavidHart »

Which ubuntu version is this? And, in case it matters (a very quick look at configure.in suggests it might), do you intend to build against gtk+2 or 3?
BeerSmith
Knows some wx things
Knows some wx things
Posts: 27
Joined: Mon Mar 07, 2011 8:39 pm

Re: Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Post by BeerSmith »

You were right - I was missing the "--with-gtk=3" flag on the configure.

If I use the following:

Code: Select all

../configure --with-gtk=3 --disable-shared --enable-debug --enable-webview
it appears to be picking up the correct libwebkit2gtk-4.0-dev libraries now when I build it. I had read somewhere that webkit2gtk uses gtk 3 but did not make the connection when configuring it.

HOWEVER - Now I have a new problem - the build fails with the following error:

Code: Select all

../src/gtk/webview_webkit2.cpp:370:53: error 'WX_WEB_EXTENSIONS_DIRECTORY' was not declared in this scope
Any thoughts on this one? I'm wondering if 3.1 might fix this - I may give it a try.

Brad
BeerSmith.com
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling wxWidgets with Newer Webkit2Gtk Libs Ubuntu

Post by DavidHart »

Before I can usefully test here, I need to know which ubuntu version you are using.

Having said that, I've successfully built a (gtk+3) wx3.1.1 with the libwebkitgtk-3.0-dev package installed. That's on ubuntu 18.04 (bionic) which also has official wx3.0.4 packages; the webview one (libwxgtk-webview3.0-gtk3) depends on libwebkit2gtk-4.0.
Post Reply