致命错误:freetype/config/ftheader.h
fatal error: freetype/config/ftheader.h
我正在尝试使用 freeglut2 在 OpenGL 中渲染文本。当我包含以下标题时,
#include <freetype2/ft2build.h>
它给出以下错误:
/usr/local/include/freetype2/ft2build.h:37:38: fatal error: freetype/config/ftheader.h: No such file or directory
但是当我去/usr/local/include/freetype2/freetype/config
时,我找到了文件ftheader.h。
请帮助我找出问题。谢谢。
我去了这个,但没有任何效果。
/usr/local/include
中搜索包含,因此当您执行以下操作时:
#include <freetype2/ft2build.h>
它找到了/usr/local/include/freetype2/ft2build.h
但是这个文件试图包含freetype/config/ftheader.h
并且没有
/usr/local/include/freetype/config/ftheader.h
但
/usr/local/include/freetyp2/freetype/config/ftheader.h
因此,您应该将-I/usr/local/include/freetyp2
传递给编译器并执行
#include <ft2build.h>
是正确的。
如果您的系统支持它 - 使用pkg-config
实用程序,它可以提供所有编译标志,例如:
$ pkg-config --cflags freetype2
-I/usr/include/freetype2
$ pkg-config --libs freetype2
-lfreetype
阅读本文档: http://freetype.org/freetype2/docs/tutorial/step1.html#section-1
您需要将/usr/local/include/freetype2 添加到包含路径中。
然后你包括ft2build.h:
#include <ft2build.h>
然后,当ft2build.h包含freetype/config/ftheader.h时,它将在包含路径中的freetype2目录中查找并找到它。
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- "assimp/config.h"找不到,但它在文件夹中
- 编译 llvm 插件时出现问题:llvm/Config/llvm-config.h:没有这样的文件或目录
- cmake boost find_depedency Config
- mingw32_gt_pch_use_address中的内部错误,在config/i386/host-mingw32.c
- 使用 C++ 显示 C:\Windows\System32\config 的内容
- Opencv4 使用 pkg-config 给出未定义的引用错误
- CONFIG += c++11(仍然)在Linux上不起作用
- Cygwin pkg-config/protobuf filepath issues
- 如何在Visual Studio Code中使用'pkg-config gtkmm-3.0 --cflags --lib
- C Shogun库:无法找到Shogun/lib/config.h文件
- 当 pkg-config 不能解决 opencv 'undefined reference'编译问题时,如何解决它?
- 创建 ./config.data 在编译 Mozilla Firefox 时失败
- 如何修复"无法打开包含文件'boost/config.hpp':没有这样的文件或目录(包括目录涵盖:C:\程序文件\boost\boost_1_67_0)
- 没有规则来制作目标'src/main/jni/Build.config'。停
- 如何在CMAKE(JUCI )中使用PKG-Config
- GTKMM-3.0:使用PKG-Config的程序构建失败的MSYS2 NetBeans
- 使用config.json文件与BBC Micro:BIT MED在线编译器
- 为什么"pyvenv"不安装"python config"
- 致命错误:freetype/config/ftheader.h