MinGW: libpng won't build properly

雨燕双飞 提交于 2019-12-11 09:49:18

问题


So I need this libpng to be statically link with my dll to be used by my exe. This dll is already done before until I switch my compiler from MSVC to MinGW, then this dll won't work anymore so I think I should rebuild it again through MinGW. Now, I cannot resolve the linker errors that I get into libpng so I decided to rebuild it(libpng) myself again. Another problem arises with this zlib or libz (I don't know their difference), so I rebuilt it again and produces libz.a using make. I then return to my dll where I want to link this libpng. No more linker errors. Now, when trying to run the test program it says, "zlib-sgd-x86.dll is missing".. dang! there's no existing dll like this in the internet! Or I'm just too blind to find it. I use codeblocks as my IDE and.. I do think I mess up the settings there because it keeps adding the flags it added before repeatedly. So, I try to use msys to build again this dll file. Now it runs w/o any dll missing, but it seems not working. As I remember, I never change the code before in my dll and I'm pretty sure it has no bugs in there.

That dll I am talking about is a textureloader and w/ functions returning the texture id of image been loaded. And it returns an id of 4 for its very first texture loaded and no image is shown in the screen. I try all the things I knew on how to build those individual files I needed but still no luck on working it properly. I don't think the problem is in my dll.

来源:https://stackoverflow.com/questions/16610362/mingw-libpng-wont-build-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!