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

February 24, 2017 · View on GitHub

 

 

 

 

 

(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:

  • STL STL: GNU ISO C++ Library, version 4.4.5

 

 

 

 

 

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.