设置png ++工作(Setting png++ to work)

编程入门 行业动态 更新时间:2024-10-28 04:19:09
设置png ++工作(Setting png++ to work)

我正在尝试编译一些使用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.

更多推荐

本文发布于:2023-04-28 01:16:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329616.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   png   work   Setting

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!