Created
March 6, 2017 23:31
-
-
Save shanna/64f3f6475654f35c8ea82e528dd5f50a to your computer and use it in GitHub Desktop.
Minimal webkit2gtk segfault on macOS runs on Linux.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <webkit2/webkit2.h> | |
#include <JavaScriptCore/JavaScript.h> | |
int main(int argc, char **argv) { | |
gtk_init(&argc, &argv); | |
GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
GtkWidget *webkit_view = webkit_web_view_new(); | |
gtk_container_add(GTK_CONTAINER(main_window), webkit_view); | |
gtk_widget_show_all(main_window); | |
webkit_web_view_load_uri(WEBKIT_WEB_VIEW(webkit_view), "https://google.com"); | |
gtk_main(); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC := clang | |
CFLAGS := -g -std=gnu99 | |
CFLAGS += -Werror -Wall -Wextra -Wno-unused-parameter | |
CFLAGS += $(shell pkg-config --cflags webkit2gtk-4.0) | |
LDFLAGS += $(shell pkg-config --libs webkit2gtk-4.0) | |
all: main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment