(C++) HelloWorldQtCreatorLubuntuToWindows

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) HelloWorldQtCreatorLubuntuToWindows

 

C++98Qt
CreatorLubuntutoWindows

 

'Hello World' using Qt Creator under Lubuntu, crosscompile to Windows is a Hello World program using the Qt Creator IDE under the Lubuntu operating system, cross compiled using MXE.

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

  • Qt Qt: version 5.4.1 (32 bit)
  • STL STL: GNU ISO C++ Library, version 4.9.2

 

 

 

 

 

Qt project file: ./CppHelloWorldQtCreatorLubuntuToWindows/CppHelloWorldQtCreatorLubuntuToWindows.pro

 


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

 

 

 

 

 

./CppHelloWorldQtCreatorLubuntuToWindows/main.cpp

 


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

 

 

 

 

 

./CppHelloWorldQtCreatorLubuntuToWindows/CppHelloWorldQtCreatorLubuntuToWindows.sh

 


#!/bin/bash myfile="../../Libraries/mxe/usr/i686-pc-mingw32/qt5/bin/qmake" mytarget="CppHelloWorldQtCreatorLubuntuToWindows" myprofile=$mytarget.pro if [ ! -e $myprofile ] then   echo "Qt Creator project '$myprofile' not found"   exit fi $myfile $myprofile if [ ! -e Makefile ] then   echo "FAIL: $myfile $myprofile"   exit fi make if [ -e ./release/$mytarget".exe" ] then   echo $mytarget": SUCCESS" else   echo $mytarget": FAIL" fi echo "2/2: making makefile" make #Cleaning up rm Makefile rm Makefile.* rm -r release rm -r debug