I'm working on a project that has three cpp files and two header files
All my files are in the same folder.
I've been trying to link the header files with the cpp files for the past few days and I'm struggling so much with it. Firstly, I tried to add the files in Build Options > Search directories > Compiler > Add Image of my setting in Build options
I've ensured that my header files are typed out properly:
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
TrackKalman.h
#ifndef TRACKKALMAN_H_INCLUDED#define TRACKKALMAN_H_INCLUDEDvoid TrackKalman();#endif // TRACKKALMAN_H_INCLUDED
TrackKalman.cpp
#include <valarray>#include <vector>#include <iostream>#include "vectorfunc.h"//function definition of TrackKalman()
main.cpp
#include <iostream>#include <fstream>#include <vector>#include <cmath>#include "TrackKalman.h"//main function
Despite all this I still get the error in my compiler:
||=== Build: Debug in RadarScanner (compiler: GNU GCC Compiler) ===| files\RadarScanner\TrackKalman.cpp -o obj\Debug\TrackKalman.o||No such file or directory| files\RadarScanner\main.cpp -o obj\Debug\main.o ||No such file or directory| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
I'm using the GNU GCC Compiler
Any help would be greatly appreciated. I can't seem to fix the issue and I definitely don't want to make the whole program in one file.