Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to #include files with relative path to the current one?
#1
#include <file> includes from the library; in order to include from the directory of the including file, the main program, i tried #include <./file> but it doesn't work. Even #include <~/path_to_the_project/file> doesn't work.

The only solution I've found is: #include </home/user/path_to_the_project/file>, that is, including the whole path from the file system root.

Is there any way to configure the including directories? It would be great to include files with relative path from the current directory if they exist, and from the library if they don't exist.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)