I want to use libvte on this gtk4 window. But facing issue during compile, demo script given below. Can anyone tell me whether libvte-2.91 is supported with gtk4? I'm on Ubuntu 22.04LTS
$ gcc -Wall $(pkg-config --cflags gtk4 vte-2.91) gtk4App.c -o term $(pkg-config --libs gtk4 vte-2.91)
ERROR SHOW--------------
In file included from /usr/include/vte-2.91/vte/vte.h:33,
from gtk4App.c:2:
/usr/include/vte-2.91/vte/vtetypebuiltins.h:27:10: fatal error: vtetypebuiltins-gtk4.h: No such file or directory
27 | #include "vtetypebuiltins-gtk4.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
This is the gtk4 script-----
#include <gtk/gtk.h>
#include <vte/vte.h>
//sudo apt install libgtk-4-dev libvte-2.91-dev
//gcc -Wall $(pkg-config --cflags gtk4 vte-2.91) gtk4App.c -o term $(pkg-config --libs gtk4 vte-2.91)
static void
activate (GtkApplication *app,
gpointer user_data)
{
GtkWidget *window;
GtkWidget *terminal;
window = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (window), "Window");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
GtkWidget *grid = gtk_grid_new ();
gtk_window_set_child ((GtkWindow *)window, grid);
gtk_widget_set_vexpand(grid, TRUE);
gtk_widget_set_hexpand(grid, TRUE);
GtkWidget *scrollview1;
scrollview1 = gtk_scrolled_window_new();
gtk_grid_attach(GTK_GRID(grid), scrollview1, 0, 0, 1, 1);
terminal = vte_terminal_new();
gtk_window_set_child ((GtkWindow *)scrollview1, terminal);
gtk_widget_show (window);
}
int
main (int argc,
char **argv)
{
GtkApplication *app;
int status;
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
I know libvte working fine with gtk+3.0,,but i want to use it on gtk4.