I think modifying CMake file has helped with the issue of not finding functions, aside from one, being gtk_application_window_new() ?.
Here's my CMake file
Code:
cmake_minimum_required(VERSION 3.7)
project(gtkz3)
set(CMAKE_C_STANDARD 99)
set(SOURCE_FILES main.c)
add_executable(gtkz3 ${SOURCE_FILES})
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(GTK "gtk+-3.0")
if (GTK_FOUND)
target_link_libraries(gtkz3 ${GTK_LIBRARIES})
add_definitions(${GTK_CFLAGS} ${GTK_CFLAGS_OTHER})
endif()
endif()
Any suggestions as to why there's now an error resolving just that one funtion?
Here's the example code i'm using from gnome.org
Code:
#include <gtk/gtk.h>
static void activate (GtkApplication* app, gpointer user_data)
{
GtkWidget *window;
window = gtk_application_window_new(app); //Cannot resolve this function?
gtk_window_set_title (GTK_WINDOW (window), "Window");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
gtk_widget_show_all (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;
}