-1

I am trying to build at the command prompt the following:

g++ -c ../../TRUNK/StringUtl.cpp -o StringUtl.o      // ok
g++ -c ../../TRUNK/CircularBuf.cpp -o CircularBuf.o  // ok
g++ -c ../../TRUNK/UartComm.cpp -o UartComm.o        // fatal error: CircularBuf.h: No such file or directory    THE header to his cpp file has #include "CircularBuf.h"

UartComm.h: contents at the top of file

//---------------------------------------------------------------------------------------
// General inclusions
//---------------------------------------------------------------------------------------
#include <stdio.h>
#include "CircularBufClass.h"
jdl
  • 6,151
  • 19
  • 83
  • 132
  • [This](https://stackoverflow.com/questions/12654013/how-to-make-g-search-for-header-files-in-a-specific-directory) maybe? – nerap Jun 22 '21 at 23:32

1 Answers1

0

This error is beacuse g++ is not able to find the header files.
You would need to provide path of your header files using -I<Path> option.
Eg:

g++ -Iyourheaderfilepath/ -c ../../TRUNK/UartComm.cpp -o UartComm.o   

Altaf
  • 2,838
  • 1
  • 16
  • 8