QT Creator Unable to find STL outside of project, Bad install?
Hello,
I am new to C++ programming.
I was trying to write a simple hello world program.
I created a New File/C++ Source File...
Then I attempted to use includes from the STL
Code:
// Game1
//
// Demonstrates constants
#include <iostream>
using namespace std;
...
The: "include <iostream>" is always listed (highlighted) as an error. Why is this only happening here but not when I create a project?
Is there something wrong with my install?
Thanks in advance,
Re: QT Creator Unable to find STL outside of project, Bad install?
What does "hightlighted" mean?
In an editor? Or do you get a build error?
Cheers,
_
Re: QT Creator Unable to find STL outside of project, Bad install?
Thanks for the reply!
:-)
When I hi-light the error it says :
iostream:No Such File or Directory
It will not allow me to build or run the code.
The complete program is here:
Code:
// Game1
//
// Demonstrates hello
#include <iostream>
using namespace std;
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}
Re: QT Creator Unable to find STL outside of project, Bad install?
What is the content of your project's .pro file?
Cheers,
_
Re: QT Creator Unable to find STL outside of project, Bad install?
Quote:
Originally Posted by
anda_skoa
What is the content of your project's .pro file?
Cheers,
_
Where do I find the .pro file?
Re: QT Creator Unable to find STL outside of project, Bad install?
Quote:
Originally Posted by
anda_skoa
What is the content of your project's .pro file?
Cheers,
_
There is no .pro file as I was attempting to write a single program and it is not part of a project. Is my thinking on this wrong?
Re: QT Creator Unable to find STL outside of project, Bad install?
If you are not using qmake to generate the build files, are you using something else or are you manually writing a Makefile?
Or are you typing the compiler invocation manually in a shell?
You need to build the program somehow :-)
Cheers,
_