Go back to Richel Bilderbeek's homepage.

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

 

 

 

 

 

(C++) HelloWorldQt5QtCreatorLubuntuToWindows

 

C++98Qt5Qt CreatorLubuntuToWindows

 

Hello World using Qt5 under Qt Creator under Lubuntu, crosscompiled to Windows is a Hello World program.

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./CppHelloWorldQt5QtCreatorLubuntuToWindows/CppHelloWorldQt5QtCreatorLubuntuToWindows.pro

 

QT       += core
QT       -= gui
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp

 

 

 

 

 

./CppHelloWorldQt5QtCreatorLubuntuToWindows/main.cpp

 

#include <iostream>

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

 

 

 

 

 

./CppHelloWorldQt5QtCreatorLubuntuToWindows/CppHelloWorldQt5QtCreatorLubuntuToWindows.sh

 

#!/bin/bash
myfile="../../Libraries/mxe/usr/i686-pc-mingw32/qt5/bin/qmake"
mytarget="CppHelloWorldQt5QtCreatorLubuntuToWindows"
myprofile=$mytarget.pro
myexe=$mytarget".exe"

if [ ! -e $myprofile ]
then
  echo "FAIL: Qt Creator project '$myprofile' not found"
  exit
fi

$myfile $myprofile

if [ ! -e Makefile ]
then
  echo "FAIL: "$myfile" "$myprofile" (makefile not found)"
  exit
fi

make

if [ -e ./release/$myexe ]
then
  echo $mytarget": SUCCESS"
else
  echo $mytarget": FAIL (executable not found)"
fi

#Cleaning up
#rm *.o
#rm Makefile
#rm Makefile.*
#rm -r release
#rm -r debug

 

 

 

 

 

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

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml