"No such file or directory" C++标头问题
"No such file or directory" C++ header issue
我正在处理一个有三个 cpp 文件和两个头文件的项目
我的所有文件都在同一个文件夹中。
在过去的几天里,我一直在尝试将头文件与 cpp 文件链接起来,但我对此非常挣扎。 首先,我尝试在"构建选项"中添加文件>"搜索目录">"编译器>添加" "生成选项"中的设置图像
我已确保我的头文件正确键入:
Vectorfunc.h
#include <vector>
#ifndef VECTORFUNC_H_INCLUDED
#define VECTORFUNC_H_INCLUDED
//my vector functions declaration
#endif // VECTORFUNC_H_INCLUDED
Vectorfunc.cpp
#include <vector>
#include "vectorfunc.h"
#include <iostream>
//my function definitions
跟踪卡尔曼.h
#ifndef TRACKKALMAN_H_INCLUDED
#define TRACKKALMAN_H_INCLUDED
void TrackKalman();
#endif // TRACKKALMAN_H_INCLUDED
跟踪卡尔曼.cpp
#include <valarray>
#include <vector>
#include <iostream>
#include "vectorfunc.h"
//function definition of TrackKalman()
主.cpp
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include "TrackKalman.h"
//main function
尽管如此,我仍然在我的编译器中收到错误:
||=== Build: Debug in RadarScanner (compiler: GNU GCC Compiler) ===|
filesRadarScannerTrackKalman.cpp -o objDebugTrackKalman.o||No such file or directory|
filesRadarScannermain.cpp -o objDebugmain.o ||No such file or directory|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
我正在使用 GNU GCC 编译器
任何帮助将不胜感激。我似乎无法解决问题,我绝对不想将整个程序放在一个文件中。
我认为你错过了
#include "TrackKalman.h”
作为TrackKalman的第一行.cpp
相关文章:
- 警告处理为错误这里有什么问题
- 最小硬币更换问题(自上而下方法)
- 为"adjacent"变量赋值时出现问题
- 我的神经网络不起作用 [XOR 问题]
- 在Ubuntu 16.04上安装Cilk时出现问题
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 编译包含字符串的代码时遇到问题
- Project Euler问题4的错误解决方案
- 问题:什么是QAbstractItemView::NoEditTriggers的反面
- 在编译C++代码(具有dlib和opencv)到WASM时面临问题
- 在进程中对同一管道进行读取和写入时C++管道出现问题
- 静态数据成员的问题-修复链接错误会导致编译器错误
- C++ 雷神库 - 使用资源加载器类时出现问题(不命名类型)
- 一个关于在C++中重载布尔运算符的问题
- 首要问题的答案让值班员搞错了
- setlocale的C++土耳其字符串问题
- 如何重构类层次结构以避免菱形问题
- 基于boost的程序的静态链接——zlib问题
- C++格式化输出问题
- 使用mongocxx驱动程序时包含头文件问题