我已经编译了相同的代码(MozJpeg项目https://github.com/mozilla/mozjpeg ),在Windows下没有问题,但我在Linux下做不到,因为它需要"algorithm“头。
我一直在搜索这个头文件,它似乎在其他系统中都可用,不仅在Windows中,而且我的编译器找不到它。也许这是一个非常简单的问题,但我在Linux方面太新手了。
请注意,该项目是使用CMake生成的,我正在尝试使用一个简单的make命令对其进行编译。
提前谢谢你。
frank@TESTWORKSTATION:~/Escritorio/GitLayama/MozJpeg/buildlinux$ make
[ 0%] Built target simd
[ 17%] Built target jpeg-static
[ 19%] Built target jpegtran-static
[ 20%] Building C object CMakeFiles/turbojpeg-static.dir/rdbmp.c.o
In file included from /home/frank/Escritorio/GitLayama/MozJpeg/rdbmp.c:29:
/home/frank/Escritorio/GitLayama/MozJpeg/cmyk.h:21:10: fatal error: algorithm: No such file or directory
21 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/turbojpeg-static.dir/build.make:752:
CMakeFiles/turbojpeg-static.dir/rdbmp.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:209: CMakeFiles/turbojpeg-
static.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
frank@TESTWORKSTATION:~/Escritorio/GitLayama/MozJpeg/buildlinux$发布于 2021-07-29 01:56:32
由于一些用户说标题不正常,我不知道错误的repo的日期是什么时候,但从上一个Git版本重新下载它工作正常。
https://stackoverflow.com/questions/68548510
复制相似问题