Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't find linked file
Can't find linked file [message #1776453] Thu, 16 November 2017 14:37 Go to next message
beny othman is currently offline beny othmanFriend
Messages: 2
Registered: November 2017
Junior Member
Hi,
I am new to eclipse and ran into a problem:

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 :-)

g beny

Compiler is gcc mingw
Re: Can't find linked file [message #1776539 is a reply to message #1776453] Fri, 17 November 2017 12:45 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 397
Registered: June 2014
Senior Member
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:

index.php/fa/31304/0/
Re: Can't find linked file [message #1776673 is a reply to message #1776539] Mon, 20 November 2017 08:39 Go to previous messageGo to next message
beny othman is currently offline beny othmanFriend
Messages: 2
Registered: November 2017
Junior Member
Thank you very much, Jonah.

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...

thank you, beny
Re: Can't find linked file [message #1777960 is a reply to message #1776673] Wed, 06 December 2017 19:42 Go to previous message
Emily John is currently offline Emily JohnFriend
Messages: 33
Registered: August 2017
Member
This is so easy you can follow the steps :

Click on the settings
Then Click on the include option
then include path -1
Previous Topic:Argument line problems (for image processing) in Eclipse C++
Next Topic:Optimize for Debug & Breakpoints
Goto Forum:
  


Current Time: Mon Dec 11 04:01:32 GMT 2017

Powered by FUDForum. Page generated in 0.01285 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software