首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >链接libpng时引用未定义

链接libpng时引用未定义
EN

Stack Overflow用户
提问于 2021-05-29 08:12:31
回答 1查看 98关注 0票数 0

我正在编译一个需要libpng的行星地图生成器。虽然我成功修复了其他错误,但这是不可能删除的:

代码语言:javascript
运行
复制
png_utils.o:png_utils.c:(.text+0x91): undefined reference to `png_create_write_struct'
png_utils.o:png_utils.c:(.text+0xa4): undefined reference to `png_create_info_struct'
png_utils.o:png_utils.c:(.text+0xca): undefined reference to `png_set_longjmp_fn'
png_utils.o:png_utils.c:(.text+0x135): undefined reference to `png_set_IHDR'
png_utils.o:png_utils.c:(.text+0x14e): undefined reference to `png_malloc'
png_utils.o:png_utils.c:(.text+0x19e): undefined reference to `png_malloc'
png_utils.o:png_utils.c:(.text+0x217): undefined reference to `png_init_io'
png_utils.o:png_utils.c:(.text+0x230): undefined reference to `png_set_rows'
png_utils.o:png_utils.c:(.text+0x252): undefined reference to `png_write_png'
png_utils.o:png_utils.c:(.text+0x281): undefined reference to `png_free'
png_utils.o:png_utils.c:(.text+0x297): undefined reference to `png_free'
png_utils.o:png_utils.c:(.text+0x2af): undefined reference to `png_destroy_write_struct'
png_utils.o:png_utils.c:(.text+0x35e): undefined reference to `png_malloc'
png_utils.o:png_utils.c:(.text+0x47c): undefined reference to `png_destroy_read_struct'
png_utils.o:png_utils.c:(.text+0x4b4): undefined reference to `png_sig_cmp'
png_utils.o:png_utils.c:(.text+0x4e0): undefined reference to `png_create_read_struct'
png_utils.o:png_utils.c:(.text+0x4f3): undefined reference to `png_create_info_struct'
png_utils.o:png_utils.c:(.text+0x509): undefined reference to `png_create_info_struct'
png_utils.o:png_utils.c:(.text+0x52f): undefined reference to `png_set_longjmp_fn'
png_utils.o:png_utils.c:(.text+0x60e): undefined reference to `png_init_io'
png_utils.o:png_utils.c:(.text+0x621): undefined reference to `png_set_sig_bytes'
png_utils.o:png_utils.c:(.text+0x643): undefined reference to `png_read_png'
png_utils.o:png_utils.c:(.text+0x689): undefined reference to `png_get_IHDR'
png_utils.o:png_utils.c:(.text+0x6f2): undefined reference to `png_get_rowbytes'
png_utils.o:png_utils.c:(.text+0x718): undefined reference to `png_get_rows'
png_utils.o:png_utils.c:(.text+0x941): undefined reference to `png_destroy_read_struct'

我使用没有安装msys2的MinGW-x64和mingw32-make。Libpng1.6.37-4安装在这两个文件夹中,我使用了-lpng和-lpng16,但它仍然不起作用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-29 10:23:46

不要紧,我正在编译的程序已经为Windows安装了一个补丁来防止这个错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67746667

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档