gtk+ without msys2 mingw

时间:2017-04-06 17:05:26

标签: gtk libpng

On Windows, trying something with gtk+. I have downloaded Msys2, along with gtk+3.0.

Successfully compiled all the gtk+3.0 examples in the msys2 mingw-w64 terminal.

Now I want to move a bit further to try work without the msys environment.

I opened up cmd and navigated to where the example executables are compiled. Then I fired them up by typing "example.exe".

libgio-2.0-0.dll missing, not surprised. I go back to check the PATH environment of the msys environment, PATH=/mingw64/bin/:/usr/local/bin:/usr/bin/:/bin:/c/Windows/System32:..blablabla

So in the cmd environment I did set PATH=%PATH%;pathto/mingw64/bin; and run example.exe again.

This time it gave a very strange error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)

So I checked, indeed there was no inflateValidate function in the dll. it seemed to me that something thought the function is in the dll and tried to call it but because it doesn't exist so it failed. What I don't understand is that why did it not fail in the msys environment but failed in the windows environment. And does that bring any impact to me if I am going to ship any gtk application? I thought simply distributing the relevant dll would be enough.

I have tried instead of adding the mingw64/bin path to the PATH variable, but copying the required dll the the execute location 1 by 1, but at the end it still gave the same error.

I have also tried to search for other libpng*.dll in my computer, none of them contained the inflateValidate function.

If anyone know whats going on please shed some light to the question.

1 个答案:

答案 0 :(得分:0)

我参加聚会的时间可能很晚,但是昨天我遇到了同样的问题(缺少inflateValidate符号),并且在检查zlib1.dll文件的内容后可以确定该功能不存在。

我下载了另一个版本(特别是这个https://sourceforge.net/projects/uqm-mods/files/latest/download,尽管我与该项目没有任何关系),并且看到确实声明了inflateValidate符号,所以我认为与您的文件捆绑在一起的zlib没有被声明符合libpng要求。

这解决了我的问题。我希望它也能解决您的问题。