Web lists-archives.com

Unable to compile example program in Windows using MSYS MinGW

Hello everyone,

I am a C beginner and trying to follow "Getting Started" chapter from the documentation. I have adapted the first example program and when I compile it on Windows using packages MSYS and the MinGW(w-64?) GCC compiler it doesn't run.

I get two error dialog boxes (one after the other) and then the program exits without showing any GUI. The errors are:
The procedure entry point deflateSetHeader could not be located in the dynamic link library C:\msys64\mingw64\bin\libgio-2.0-0.dll. 
The procedure entry point inflateReset2 could not be located in the dynamic link library C:\msys64\mingw64\bin\libpng16-16.dll. 
I find these errors to be strange... are the binaries corrupted? I followed all the instructions on the download page for Windows and I have re-installed the packages several times now.

Can anyone guide me in the right direction? There also seems to be a recent issue in the MSYS repository related to my problem.

I am attaching the source code in case if that makes any difference (it is not a 1 to 1 copy from the documentation). I have previously compiled this on my other laptop which runs Fedora and it works well.

Thanks for reading and helping in advance! :)

With Regards, Damon H. (TheDcoder)

#include <gtk/gtk.h>

static void activate(GtkApplication* app, gpointer user_data) {
	GtkWidget *window;
	window = gtk_application_window_new(app);
	gtk_window_set_title(GTK_WINDOW(window), "TheDcoder's Window");
	gtk_window_set_default_size(GTK_WINDOW(window), 200, 200);

int main(void) {
	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), 0, NULL);
	return status;
gtk-list mailing list