Unable to compile example program in Windows using MSYS MinGW

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to compile example program in Windows using MSYS MinGW

Gtk+ - General mailing list
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)


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list

example-0.c (856 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to compile example program in Windows using MSYS MinGW

Allin Cottrell
On Thu, 24 May 2018, "Damon H. (TheDcoder)" via gtk-list wrote:

> I am a C beginner and trying to follow "[Getting
> Started](https://developer.gnome.org/gtk3/stable/gtk-getting-started.html)"
> 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.

These functions should be provided by zlib. Is that not being linked
in? (linker flag: -lz)

Allin Cottrell
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Unable to compile example program in Windows using MSYS MinGW

Gtk+ - General mailing list
Thanks for the directions Allin, I did not link zlib while compiling. I recompiled it with zlib linked this but that did not help!

Fortunately I got another nudge in the right direction at GitHub where I found out that there was a rouge zlib DLL in my %PATH% from Intel... My application worked perfect after I removed it from path, it even works without linking zlib now. Not sure how it works but it does work now.

Thanks for the help! :)

Regards, Damon H. (TheDcoder)

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On 25 May 2018 7:18 PM, Allin Cottrell [hidden email] wrote:

On Thu, 24 May 2018, "Damon H. (TheDcoder)" via gtk-list wrote:
I am a C beginner and trying to follow "GettingStarted"
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.
These functions should be provided by zlib. Is that not being linked
in? (linker flag: -lz)
Allin Cottrell


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list