linux - #包括linux C++中的致命错误
问题描述
我在 Windows 中编译了相同的代码(MozJpeg 项目https://github.com/mozilla/mozjpeg)没有问题,但我没能在 Linux 中做到这一点,因为它需要“算法”标头。
我一直在搜索该标头,它似乎在其他系统中可用,不仅在 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$
解决方案
正如一些用户所说,标题不正确,我不知道错误回购的日期是什么,但是从上一个 Git 版本重新下载它可以正常工作。
推荐阅读
- html - 如何覆盖默认的 IOS 下拉菜单?
- c# - 在添加到列表之前存在检查之间的性能并且在 linq 中存在差异
- java - 对线程应用程序进行单元测试
- javascript - 如何使用来自外部 API 的数据播种 mongodb?
- adonis.js - SyntaxError: Unexpected identifier - 尝试使用 AdonisJS 播种数据时收到
- logstash-grok - 如何在 Athena 中指定多个 grokCustomPatterns?
- c++ - 在编译时构建开关
- javascript - ServiceWorker 注册失败,使用 localhost
- git - 为什么 git 不跟踪我的目录?
- java - 当我将文件上传到 Vsftpd 服务器时,文件被锁定