Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KDevelop says Included file was not found::iostream

Totally new to Kubuntu and KDevelop. I created a new No GUI(CMake) Simple CMake-based C++ application.

There is a red squiggly line under #include and I have the error

Included file was not found::iostream

Any answers I found via Google were still too advance for me. The kind of answer I need is "Click on this menu item, then this, then that, etc."

Thank you!

(EDIT: Added code)

#include <iostream>

int main(int argc, char **argv) {
    std::cout << "Hello, world!" << std::endl;
    return 0;
}
like image 959
user390480 Avatar asked Nov 18 '25 01:11

user390480


1 Answers

It looks to me like you still need to install G++ et all, as that should be in your include path and known by KDevelop by default.

On a side note, I don't know what version of KDevelop Ubuntu is shipping these days, but if it's anything less then 4.2, you certainly want to upgrade.

If you're sure you have your basic c++ dev packages installed, if you hover over the error you should get an assistant that will allow you to add a custom include path, where you could add the path (ie "/usr/include/c++/4.6.2/", with your GCC version instead). In practice, you should never need to do this with a CMake project in KDevelop, however.

like image 125
OliJG Avatar answered Nov 19 '25 21:11

OliJG