Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Qt CreatorWineUbuntuDesktop Hello World using (a Windows version of) Qt Creator under Wine under Ubuntu

 

Hello World (or 'The Hello World program') is a standard example program to see if your programming environment works. Note that this example code is not standarized, so multiple and similar variants are on the Internet. A more demanding example is Hello Boost, which also tests if the Boost libraries are installed correctly.

 

 

 

 

 

 

 

Technical facts

 

Application type(s)

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: CppHelloWorld.pro

 

The Qt project file used is a default-created console application Qt project file:

 

#-------------------------------------------------
#
# Project created by QtCreator 2010-09-29T14:58:49
#
#-------------------------------------------------
QT       += core
QT       -= gui
TARGET = CppHelloWorld
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp

 

 

 

 

 

main.cpp

 

A default Hello World main:

 

#include <iostream>

int main()
{
  std::cout << "Hello World\n";
}

 

 

 

 

 

Run Settings

 

Do 'Projects (CTRL-5) | Run | Check 'Run in terminal' (screenshot (png)).

 

If this step is forgotten, no output will be shown.

 

 

 

 

 

Starting the program

 

Click 'Run' in the bottom-left of press CTRL-R.

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict