I'm wanting to include files from the parent directory in a project I am working on. All of the header files are in the parent directory, is there any way of using -I on the commandline to search for includes in the parent directory without using an absolute path?
I know I can solve these issues using a makefile and I will probably end up doing this, but I'd like to know if there is a quick commandline trick I can use as this situation pops up a lot when I am making quick prototype code.
Currently I am trying to compile using:
g++ -Wall -I../ simple.cpp
but this seems to not work properly. Will I also need to change the includes in simple.cpp from #include include_file.hpp to #include ../include_file.hpp ?
/, but otherwise this should work OK:g++ -Wall -I.. simple.cppNo such file or directoryerror.-I..would be from the directory you start g++ from. Will that always be the right one? Think nested make files?-I..did the trick! Thanks!