It is currently Mon Dec 09, 2019 6:35 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Importing webkit or any lib function
PostPosted: Sun Sep 16, 2018 1:47 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 634
I want to use WebKitUserContentManager functions:
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitUserContentManager.html

For example webkit_user_content_manager_new()
after sudo apt-get install libwebkitgtk-3.0-dev
i tried:
Code:
importc "-lwebkitgtk-3.0"
webkit_user_content_manager_new_() as "webkit_user_content_manager_new"
endimport


but the compiler throws undefined reference to webkit_user_content_manager_new
i guess -lwebkitgtk-3.0 is not the right lib?


Top
 Profile  
Reply with quote  
 Post subject: Re: Importing webkit or any lib function
PostPosted: Sun Sep 16, 2018 3:16 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 634
i also tried:
sudo apt-get install libwebkit2gtk-3.0-dev
Code:
ImportC "-lwebkit2gtk-3.0"
 webkit_user_content_manager_new()
EndImport


with the same results.
any hints?


Top
 Profile  
Reply with quote  
 Post subject: Re: Importing webkit or any lib function
PostPosted: Mon Sep 17, 2018 8:34 am 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1656
Location: Germany
WebKitUserContentManager is a class of WebKit2GTK+ and is not contained in WebKitGTK. Therefore you have to use WebKit2GTK.

While WebKitGTK+ can be compiled against either GTK+2 or GTK+3, WebKit2GTK depends solely on GTK+3 and the most current library filename is libwebkit2gtk-4.0.so. So in order to execute functions of the WebKitUserContentManager, you should install the developer version of libwebkit2gtk-4.0:
Quote:
sudo apt-get install libwebkit2gtk-4.0-dev

After the installation of the developer version the following import and function call works on my Xubuntu 18.04 x86 with Xfce:
Code:
ImportC "-lwebkit2gtk-4.0"
  webkit_user_content_manager_new()
EndImport

Debug webkit_user_content_manager_new()

If you should still have difficulties: it's always easier to help if you would state your Linux distribution and desktop environment... :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: Importing webkit or any lib function
PostPosted: Mon Sep 17, 2018 2:06 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 634
Hi shardik, that did it, thanks!

At least in xfce last version, in an old Mint 17 mate i still get a linker error, i have probably messed up that distro, i will update.


Top
 Profile  
Reply with quote  
 Post subject: Re: Importing webkit or any lib function
PostPosted: Mon Sep 17, 2018 2:52 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1656
Location: Germany
I have just also tried it on an Ubuntu MATE 16.04 x86 with Mate and Linux Mint 18.3 x64 'Sylvia' with Cinnamon. After installing libwebkit2gtk-4.0-dev as described above the import worked like a charm.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye