问题描述
我试图编译一些使用png ++加载/编写.png图像的基本示例(这是一个用于libpng的c ++包装)。对我来说,使用png ++而不是一个替代品是非常重要的
作为先决条件png ++需要我已经成功构建的libpng。
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.
我试图找出如何设置的示例位于以下链接
它附带一个cmakelist,我使用Cmake建立这两个例子。
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.
但是当我构建这个我得到以下错误:无法检测到字节顺序来自config.hpp
however when I build this I get the following error : "Byte-order could not be detected." which comes from config.hpp
非常感谢
推荐答案
我想,libpng ++不正确定义一个WIN32平台。
I think, libpng++ incorrect defines a WIN32 platform.
在config.hpp文件中将 #elif defined(__ WIN32)替换为 #elif defined(WIN32)。
You can try to replace #elif defined(__WIN32) to #elif defined(WIN32) in config.hpp file.
PS我现在没有安装libpng ++,所以我可能错了。
P.S. I do not have libpng++ installed right now, so I may be wrong.
P.S.S。它只适用于Windows,ofc。
P.S.S. And it's only suitable for Windows, ofc.
这篇关于将png ++设置为工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!