Good morning, I have a question about how to fix the following Linux Makefile code:
g++ -g -Wall -I"./" -I"../CameraControlLib" -I"./Cameras" -I"../../Utilities/DataServer" -o Server.o CameraControlLib/Server.cpp
In this particular case, DataServerLib.h includes CameraControlDefs.h as shown below. The Ubuntu Linux g++ compiler resolves the include file, DataServerLib.h, correctly using the -I preprocessor directive as shown below. However, the g++ compiler tells me that there is no such file or directory as CameraControlDefs.h even though I point a -I subdirectory path to ../../Utilities/DataServer.
In file included from CameraControlLib/DataServer.h:4:0, from CameraControlLib/DataServer.cpp:8: CameraControlLib/DataServerLib.h:9:31: fatal error: CameraControlDefs.h: No such file or directory #include "CameraControlDefs.h" ^ compilation terminated.
I know that if I use #include "SomeDir/CameraControlDefs.h" ,that should get rid of the compiler error message. Please let me know if there is an alternate way to do this using the full range of Linux g++ options.