我正在尝试编译一些使用png ++(这是libpng的c ++包装器)加载/编写.png图像的基本示例。对我来说使用png ++非常重要而不是替代。作为先决条件,png ++需要libpng,我有成功建成。
我试图弄清楚如何设置的示例位于以下链接。 http://fedetft.wordpress.com/2010/10/05/handling-png-images-in-cpp/它附带了一个cmakelist,我正在使用Cmake来构建这两个例子。
但是当我构建它时,我收到以下错误:“无法检测到字节顺序。” 它来自config.hpp
非常感谢你
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
最满意答案
我认为,libpng ++不正确定义了一个WIN32平台。
您可以尝试将#elif定义的(__ WIN32)替换为config.hpp文件中的#elif defined(WIN32) 。
PS我现在没有安装libpng ++,所以我可能错了。
PSS它只适用于Windows,ofc。
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.
更多推荐
发布评论