SliTaz SliTaz Forum

You are not logged in.

#1 2016-07-10 12:12:22

hackdorte
Member
Registered: 2014-06-05
Posts: 83

Error to compile with Webkit-1.0

Hi.

I have installed:

libwebkit-dev 1.8.3

libwebkit-video-dev 1.8.3

webkit-r-dev 99690

The code ( http://paste.slitaz.org/?9f6822af58c453a7#V+O1LIy530pvV3sOzIbPdSbJosigngVEs4wFWD8DqMo= ) does not compile.

Command:

$ gcc -g main.c -o mybrowser [c]pkg-config --cflags gtk+-2.0[/c] [c]pkg-config --libs gtk+-2.0 webkit-1.0[/c]

Error:

main.c:2:27: fatal error: webkit/webkit.h: File or directory not found

compilation terminated.

OS: SliTaz Rolling 5.0 - (10 Jul 2016).

Offline

#2 2016-07-10 12:34:27

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Error to compile with Webkit-1.0

Hi Leonardo,

Please, try something like in the "tazweb" receipt: http://hg.slitaz.org/tazweb/file/d08682991ad1/Makefile (see line 15).

(In other words, combine your two commands into one). The command will add all options need to find your *.h files.

And, I think you really don't need all the three dev packages at one place at a time. Choose between "libwebkit-dev", "libwebkit-video-dev", and "webkit-r-dev". Because all the three provides the file "/usr/include/webkitgtk-1.0/webkit/webkit.h": all other package will overwrite the file from the previous package (but may leave other previous' package's files unchanged) that will produce the mess...

Offline

#3 2016-07-10 18:41:09

mojo
Administrator
Registered: 2011-03-29
Posts: 2,173

Re: Error to compile with Webkit-1.0

@hackdorte

"pkg-config --cflags webkit-1.0" shows gcc the path to /usr/include/webkitgtk-1.0/webkit/webkit.h

tux@slitaz:~/hackdorte$ pkg-config --cflags  webkit-1.0

-pthread -I/usr/include/webkitgtk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/harfbuzz -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/webkitgtk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

Nest pkg-config statements inside backtics

Change

pkg-config --cflags gtk+-2.0

To

pkg-config --cflags gtk+-2.0 webkit-1.0

http://paste.slitaz.org/?248b53f26353feba#oHvat/li4CiKBkZ5mU933a7cihstnPO0b346p2yvYqA=

Combine 2 pkg-config statements into 1 from tazweb make file:

pkg-config --cflags --libs gtk+-2.0 webkit-1.0

http://paste.slitaz.org/?ed9106fc6aab2da1#ePOyrPeZUyeQSZOQ15IDQTVfczeibQm3thGNh00VGUA=

Offline

#4 2016-07-11 03:56:34

hackdorte
Member
Registered: 2014-06-05
Posts: 83

Re: Error to compile with Webkit-1.0

Hi Aleksej.

I removed the packages: libwebkit-video-dev and webkit-r-dev. And followed your tips. I thought "libwebkit-video-dev" enabled support for HTML5 videos. The tazweb script is very interesting.

I'm only with 'libwebkit-dev' installed at the moment.

Hi mojo.

I tried the command "gcc -v -g main.c -o mybrowser pkg-config --cflags --libs gtk+-2.0 webkit-1.0" and compiled correctly.

I did not know that the "pkg-config" command displays the information of the paths.

Very grateful for the information of all. Thanks smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]