User forums > Help
#include <iostream> NO such File or Directory
Leron:
Well, neither i get what you meant. cmake generated .cbp file, i opened it. Are you saying that now i can't control what directories compiler will search for headers?
stahta01:
--- Quote from: Leron on August 25, 2010, 10:05:12 pm ---Well, neither i get what you meant. cmake generated .cbp file, i opened it. Are you saying that now i can't control what directories compiler will search for headers?
--- End quote ---
No, we are saying you need to learn to use the Makefile system to do that fix.
Or, convert your program to use the Code::Blocks native build system; this may be simple to very hard to do, Depending on the complexity and size of your application/library.
Note: I suggest reading what options can be passed to make command using the makefile to solve this problem and after finding the options; ask where in Code::Blocks the make options can be placed.
Edit: What I personally would do would be to create an new makefile that uses the CMake generated top makefile and inside my new makefile I would do all the changes needed to fix problems like you are having. But, this requires knowing how to write simple to moderately complex makefiles. I would then change C::B to use my new makefile.
Tim S.
Leron:
Well, cmake is able to generate VC++ projects, i guess on windows that would be fine.
jayushkin:
--- Quote from: shiguy48 on November 02, 2007, 03:19:03 pm ---hello there i am new to c++
i have tryed to compile this program but it says
#include <iostream> NO such File or Directory
was just wondering y as some of my programs work right but some do this
#include <iostream>
using namespace std
main()
{
cout << "hello there Does this program work" << endl;
cout << "check it a new line" << endl;
return(0);
}
any help would be apprecated greatly thx
--- End quote ---
I had the same problem. I managed to fix the file not found problem by adding CodeBlocks/MinGW/lib/gcc/mingw32/4.4.1/include/c++ but I am still getting "cout" not resolved.
--- Quote ---C:\Users\jay\Documents\mmorpg\helloworld.cpp||In function 'int main()':|
C:\Users\jay\Documents\mmorpg\helloworld.cpp|5|error: 'cout' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|
--- End quote ---
I don't understand why CodeBlocks should not set its own search paths properly when it gets installed. Hopefully the remaining problem will yield to the same approach, otherwise I'm out of ideas.
Jenna:
--- Quote from: jayushkin on September 22, 2010, 11:03:14 am ---I don't understand why CodeBlocks should not set its own search paths properly when it gets installed. Hopefully the remaining problem will yield to the same approach, otherwise I'm out of ideas.
--- End quote ---
Code::Blocks is an IDE, not a compiler, so it don't need to set searchpaths.
Normally the compiler finds his libs and headers without explicitely setting a searchpath.
If not, something is wrong with either your setup and/or yur compiler !
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version