Setting png++ to work

跟風遠走 提交于 2019-12-23 20:36:20

问题


I am trying to compile some basic example of loading/writing a .png image using png++ (which is a c++ wrapper for libpng. It is quite important for me to use png++ and not an alternative. As prerequisites png++ needs both libpng which I have successfully built.

the example that i am trying to figure out how to set is located at the following link. http://fedetft.wordpress.com/2010/10/05/handling-png-images-in-cpp/ it ships with a cmakelist and I am using Cmake to build the two examples.

however when I build this I get the following error : "Byte-order could not be detected." which comes from config.hpp

thank you very much


回答1:


I think, libpng++ incorrect defines a WIN32 platform.

You can try to replace #elif defined(__WIN32) to #elif defined(WIN32) in config.hpp file.

P.S. I do not have libpng++ installed right now, so I may be wrong.

P.S.S. And it's only suitable for Windows, ofc.



来源:https://stackoverflow.com/questions/10248145/setting-png-to-work

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