Reputation: 31
I am trying to test a particular function in a software. I have written a small test file for this purpose as given below
#include<iostream>
#include "bignum.h"
#include "Equation.h"
#include "matrix.h"
#include "hermite.h"
using namespace std;
int main() {
matrix* mat = new matrix(3, 1, new vector<string>());
hnf(&mat);
}
My directory and file structure is as follows. Equation.h includes bignum.h while hermite.h includes Equation.h and matrix.h. All files except Equation.h are in the same directory while Equation.h is in some other directory.
I am not able to figure out the right way to compile test.cpp with g++.
Upvotes: 0
Views: 333
Reputation: 842
You need to use the flag -I<dir>
, replacing <dir>
to tell g++ where to search for the header files.
Upvotes: 1