ar2015
ar2015

Reputation: 6140

gcc compiler error message path cancelling parent

I have hierarchy of files and folders containing C++ codes. They often include each other like:

#include "../../Foder1/Lib4/file12.hpp"

When I compile the code, in case of error, I see a message like:

Foder2/Lib7/../../Foder1/Lib4/file12.hpp:71:4: error <something>

While I prefer to see .. standing for parent directory is canceled out in the gcc error message:

Foder1/Lib4/file12.hpp:71:4: error <something>

Any option for calling gcc?

Upvotes: 1

Views: 122

Answers (1)

Glapa
Glapa

Reputation: 800

If you add -I [Folder...'s base dir] to your gcc call you can include files by #include "Foder1/Lib4/file12.hpp" and then messages should be better formatted.

Upvotes: 1

Related Questions