没有这样的文件或目录,只有file存在
No such file or directory but file exist
我安装了pcl。在user/include/pcl-1.7
下有一个pcl文件夹。我添加#include <pcl/ModelCoefficients.h>
行到cpp文件。在终端上,我尝试编译这个文件。
g++ -c test.cpp
fatal error: pcl/ModelCoefficients.h: No such file or directory
#include <pcl/ModelCoefficients.h>
^
compilation terminated.
如何解决这个错误?
使用-I
告诉编译器在user/include/plc-1.7
路径中搜索头文件:
g++ -Iuser/include/plc-1.7 -c test.cpp
更多信息:
- https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
- https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
相关文章:
- Seg Fault Issue C++ (file IO / getline)
- 如果有一个模板构造函数只有一个泛型参数,为什么我必须有一个复制构造函数
- 有没有可能有一个只有ADL才能找到的非好友功能
- 在不传递参数数量且只有3个点的情况下,如何使用变差函数
- 应用程序崩溃并显示"symbol _ZdlPvm, version Qt_5 not defined in file libQt5Core.so.5 with link time reference"
- 为什么不调用移动构造函数?(默认情况下只有构造器,没有别的)
- 将 cin 限制为只有一个
- Android NDK clang 编译器错误在 Windows 上显示'No such file or directory'
- 只有一个内环的打印图案
- File.cpp.o:OpenPose 标志 CMakeFiles/.. 的多重定义/main.cpp.o:首先在这里定
- Visual Studio C++ Project File CustomBuild Task: Filter Outp
- C++ std::function 对于类 exept 的所有实例都是空的(只有 Visual2019 编译器问题)
- 在运行时检查继承是否只有一种类型和 void*
- 只有级联分类器会发出未定义的引用错误
- 为什么在排序链表上的这种合并实现总是将两个列表都设置为 NULL,而只有一个应该设置一个列表?
- 已解决 - C++ 的崇高文本中的"fatal error: opencv: no such file or directory"
- C++线程安全:如果只有一个线程可以写入非原子变量,但多个线程从中读取. 会遇到问题吗?
- 可视化 如何在C++中将字符数组转换为 FILE 类型
- 只有 2 和 5 作为其数字的特殊数字
- 没有这样的文件或目录,只有file存在