Hello--

I found another problem in compiling IUP against GTK3 on Linux.
Fortunately, this one is easily fixed.

The iupweb library is linked with libwebkitgtk-1.0; this is incompatible
with GTK3, so if you compile with GTK3, (if I understand correctly), any
code that uses iupweb will fail with errors like:

    GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same
process is not supported

I gather that webkitgtk-3.0 has the same API as 1.0, so the solution should
be as simple as using 1.0 with GTK2, and 3.0 with GTK3. Though I haven't
done any serious work with it yet, this seems to work for me. I'm attaching
a patch that modifies 'srcweb/config.mak' accordingly.

--
Matt Gushee
--- srcweb/config.mak.orig	2014-07-31 10:43:05.000000000 -0600
+++ srcweb/config.mak	2015-04-27 12:47:42.099035851 -0600
@@ -17,11 +17,16 @@
     SRC  += iupgtk_webbrowser.c
     USE_GTK = Yes
     INCLUDES += ../src/gtk
-    INCLUDES += $(GTK)/include/webkit-1.0 $(GTK)/include/libsoup-2.4
+    INCLUDES += $(GTK)/include/webkit-1.0 /usr/include/webkit-1.0 /usr/include/libsoup-2.4 $(GTK)/include/libsoup-2.4
     
+    ifdef USE_GTK3
+      WEBKITGTK_VERSION = 3.0
+    else
+      WEBKITGTK_VERSION = 1.0
+    endif
     ifneq ($(findstring Linux3, $(TEC_UNAME)), )
-      LIBS += webkitgtk-1.0
-      INCLUDES += $(GTK)/include/webkitgtk-1.0
+      LIBS += webkitgtk-$(WEBKITGTK_VERSION)
+      INCLUDES += $(GTK)/include/webkitgtk-$(WEBKITGTK_VERSION)
     else
       LIBS += webkit-1.0
     endif
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to