Code::Blocks Forums

User forums => Help => Topic started by: add_dir on September 03, 2008, 07:45:07 pm

Title: Trying to open include file. Not found
Post by: add_dir on September 03, 2008, 07:45:07 pm
Hello. In the editor window, where my main.cpp is opened, I right-click on "#include <iostream>" and choose "open #include file: 'iostream'". As I understand, this must cause opening of iostream header in new tab. But instead this I get the next warning message: "not found: iostream". The same thing with other included headers. Also when I try to find declaration of funtcions, I use in my program, I get the same "not found" warning. Still the program compiles and runs without errors. What am I doing or understanding wrong? Thanks.
Title: Re: Trying to open include file. Not found
Post by: rcoll on September 03, 2008, 08:21:43 pm
Under Project->Build Options, make sure the compiler "Search Directories" has the path to where those files are located.

It compiles OK because the compiler has a default set of search directories, and thus can find the proper files.  But C::B doen't know about them, so you have to tell it.

Ringo
Title: Re: Trying to open include file. Not found
Post by: add_dir on September 03, 2008, 09:33:19 pm
That's it! Thank you.
The path was in "search directories" but only for the Debug, not for whole project. When I added the path to whole project, it became all right.
Title: Re: Trying to open include file. Not found
Post by: phr3ak on September 17, 2008, 11:01:10 am
Why didn't work the "find declaration" on printf?
Title: Re: Trying to open include file. Not found
Post by: cichmen on July 27, 2009, 04:41:46 pm
Hi,

is there needed to have the path under Project->Build Options or is it possible to put this path under Global Compiler Settings?

I think it worked when it was under Global Compiler Settings, but now (SVN 5678) it does not. However it works when the path is under Project->Build Options.

Cichmen
Title: Re: Trying to open include file. Not found
Post by: helpse on September 19, 2010, 11:26:33 am
Hello. In the editor window, where my main.cpp is opened, I right-click on "#include <iostream>" and choose "open #include file: 'iostream'". As I understand, this must cause opening of iostream header in new tab. But instead this I get the next warning message: "not found: iostream". The same thing with other included headers. Also when I try to find declaration of funtcions, I use in my program, I get the same "not found" warning. Still the program compiles and runs without errors. What am I doing or understanding wrong? Thanks.

i have the same problem! And i couldnt get it fixed by adding the paths to Environment settings -> Search Directories! And i mean, its about a single file, not a project, so i cant access to the Project Build Options. I asked a friend, and for he, its working normally. Why it isnt working for me?
Title: Re: Trying to open include file. Not found
Post by: polymorpher on June 30, 2011, 01:48:47 pm
Hello. In the editor window, where my main.cpp is opened, I right-click on "#include <iostream>" and choose "open #include file: 'iostream'". As I understand, this must cause opening of iostream header in new tab. But instead this I get the next warning message: "not found: iostream". The same thing with other included headers. Also when I try to find declaration of funtcions, I use in my program, I get the same "not found" warning. Still the program compiles and runs without errors. What am I doing or understanding wrong? Thanks.

i have the same problem! And i couldnt get it fixed by adding the paths to Environment settings -> Search Directories! And i mean, its about a single file, not a project, so i cant access to the Project Build Options. I asked a friend, and for he, its working normally. Why it isnt working for me?
I had the same problem. Fixed by saving the workspace and project.