I created a project with some .h and .c files in it. As long as all these files are in the project directory everything works fine and I can compile the whole project. But one of these files (a .h file) is from another project and I want to have it linked to that project instead of having a copy in my project directory. So what I did is right click on my project->New->File->Advanced (Link to file in the file System). So far everything looks really good but trying to compile my project results in a fatal error: No such file or directory.
I tried to fix this problem the whole day without success... please help me :-)
If your .h files are somewhere else, you need to add their containing directory to your include search path. This is the -I (upper case i) on the command line and can be set in Project Properties -> C/C++ Build -> Settings -> C(or C++) compiler -> Includes:
I just wanted to add some files from that directory. Unfortunately there are files in that directory which have the same name as in my workspace which I don't want to be taken into account. Unfortunately putting the files I want to be linked in to (-include) section does not work, too.
Now I found a workaround by creating a file in my workspace with the same name as in that directory and just put an include and the path of that file. I don't like this solution but it works fine...