when i try to make this project it works normal, but nothing appears in the console window. i can ´t show a simple cout<<"hello world". someone knows what's happening?
i newbie i qt creator...
Printable View
when i try to make this project it works normal, but nothing appears in the console window. i can ´t show a simple cout<<"hello world". someone knows what's happening?
i newbie i qt creator...
can you post the contents of your .pro file & main.cpp file
Code:
#include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; }
Code:
TEMPLATE = app CONFIG += console CONFIG -= qt SOURCES += main.cpp
but when i try the same on windows 7 it works fine! i don know what's happening!
What you have there is the generic, wizard-created "Non Qt-project, Plain C++" program.
I am assuming your first attempt was on a Linux box.
If you are running the program from inside Qt Creator then there are two possible places the output is going:
- Into a terminal window that pops up, shows your program output, and waits for you to "Press <RETURN> to close this window...". This is the default created by the wizard.
- Into the "Application Output" pane if the "Run in terminal" option is off. Find this option in Projects, Build & Run, Run settings.
Some terminal programs have an issue with being used in Qt Creator (e.g. KDE konsole) and, of course, one needs to be installed. Under Tools menu, Options, Environment, General tab check the "Terminal" settings. It is probably "xterm -e". If so, check that you have xterm installed or launching your program with it will fail with an error in the Program Output pane.
Attachment 9049
screenshot
nothing appears on console .
only the cursor's mouse
I guess whatever Ubuntu is using as a terminal ("Terminal") is similarly afflicted. Change it to "xterm -e" and install xterm, or set the project to not run in a terminal as described above.Quote:
Originally Posted by Me
i have this istalled:
x-terminal-emulator -e
is the right terminal? how can i download the right?
Replace that with:
If nothing happens because xterm is not installed:Code:
xterm -e
Or use whatever Ubuntu's graphical package manager is to do the same thing.Code:
sudo apt-get install xterm
Then find a Ubuntu beginners' guide and read some of it.
http://ubuntu-manual.org/
http://www.ubuntupocketguide.com/