gpt4 book ai didi

使用 cygwin 在 Windows 上编译 libjpeg?

转载 作者:可可西里 更新时间:2023-11-01 10:37:40 25 4
gpt4 key购买 nike

在 Windows 机器上编译 libjpeg 的最佳方法是什么?我应该使用 Microsoft Visual Studio 还是可以使用其他软件(如 Cygwin)?

注意:当我使用Cygwin并将makefile.vc复制到Makefile时,将jconfig.vc复制到jconfig.h 并运行此示例代码:http://www.cim.mcgill.ca/~junaed/code/libjpeg_sample.tar.gz

然后编译器产生以下错误:

$ gcc main.c
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x5a): undefined reference to `jpeg_std_error'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x7e): undefined reference to `jpeg_CreateDecompress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x93): undefined reference to `jpeg_stdio_src'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0xa9): undefined reference to `jpeg_read_header'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0xb7): undefined reference to `jpeg_start_decompress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x11b): undefined reference to `jpeg_read_scanlines'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x178): undefined reference to `jpeg_finish_decompress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x186): undefined reference to `jpeg_destroy_decompress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x1f6): undefined reference to `jpeg_std_error'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x21a): undefined reference to `jpeg_CreateCompress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x22f): undefined reference to `jpeg_stdio_dest'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x269): undefined reference to `jpeg_set_defaults'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x27f): undefined reference to `jpeg_start_compress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x2c7): undefined reference to `jpeg_write_scanlines'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x2e5): undefined reference to `jpeg_finish_compress'
C:\cygwin\tmp\ccwChyeY.o:main.c:(.text+0x2f3): undefined reference to `jpeg_destroy_compress'
collect2.exe: error: ld returned 1 exit status

最佳答案

好吧,如果您只需要 .dll,它已经编译好了。

https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libjpeg&arch=x86_64

关于使用 cygwin 在 Windows 上编译 libjpeg?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16113867/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com