macos – LibPNG Boost :: GIL:找不到png_infopp_NULL

macos – LibPNG Boost :: GIL:找不到png_infopp_NULL,第1张

概述尝试使用Boost :: GIL PNG IO支持编译我的文件时,我总是遇到此错误: (我正在运行Mac OS X Leopard和Boost 1.42,LibPNG 1.4) /usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'void boost::gil::detail::png_ 尝试使用Boost :: GIL PNG IO支持编译我的文件时,我总是遇到此错误:

(我正在运行Mac OS X Leopard和Boost 1.42,libPNG 1.4)

/usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'voID boost::gil::detail::png_reader::init()':/usr/local/include/boost/gil/extension/io/png_io_private.hpp:155: error: 'png_infopp_NulL' was not declared in this scope/usr/local/include/boost/gil/extension/io/png_io_private.hpp:160: error: 'png_infopp_NulL' was not declared in this scope/usr/local/include/boost/gil/extension/io/png_io_private.hpp: In destructor 'boost::gil::detail::png_reader::~png_reader()':/usr/local/include/boost/gil/extension/io/png_io_private.hpp:174: error: 'png_infopp_NulL' was not declared in this scope/usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'voID boost::gil::detail::png_reader::apply(const VIEw&)':/usr/local/include/boost/gil/extension/io/png_io_private.hpp:186: error: 'int_p_NulL' was not declared in this scope/usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'voID boost::gil::detail::png_reader_color_convert<CC>::apply(const VIEw&)':/usr/local/include/boost/gil/extension/io/png_io_private.hpp:228: error: 'int_p_NulL' was not declared in this scope/usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'voID boost::gil::detail::png_writer::init()':/usr/local/include/boost/gil/extension/io/png_io_private.hpp:317: error: 'png_infopp_NulL' was not declared in this scope
解决方法 libpng 1.4删除了png_infopp_NulL和int_p_NulL的定义.所以加

#define png_infopp_NulL (png_infopp)NulL#define int_p_NulL (int*)NulL

在包含GIL标头之前的代码中.

总结

以上是内存溢出为你收集整理的macos – LibPNG Boost :: GIL:找不到png_infopp_NULL全部内容,希望文章能够帮你解决macos – LibPNG Boost :: GIL:找不到png_infopp_NULL所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1224406.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-05
下一篇 2022-06-05

发表评论

登录后才能评论

评论列表(0条)

保存