(C++) HelloCpp11QtCreatorCygwin
February 24, 2017 · View on GitHub
(C++) HelloCpp11QtCreatorCygwin



Hello C++11 using Qt Creator under Cygwin is a Hello C++11 program.
Technical facts
Operating system(s) or programming environment(s)
Lubuntu 15.04 (vivid)
Qt Creator 3.1.1
- G++ 4.9.2
Libraries used:
Qt project file: ./CppHelloCpp11QtCreatorCygwin/CppHelloCpp11QtCreatorCygwin.pro
QT += core QT -= gui QMAKE_CXXFLAGS += -std=c++11 CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp
./CppHelloCpp11QtCreatorCygwin/main.cpp
#include <iostream> int main() { const auto s = "Hello C++11"; std::cout << s << '\n'; }
./CppHelloCpp11QtCreatorCygwin/CppHelloCpp11QtCreatorCygwin.sh
#!/bin/bash mymake="make.exe" myqmake="/usr/lib/qt4/bin/qmake.exe" mytarget="CppHelloCpp11QtCreatorCygwin" myprofile=$mytarget.pro myexe=$mytarget.exe if [ -e $myqmake ] then echo "Compiler '$myqmake' found" else echo "Compiler '$myqmake' not found directly" #exit fi if [ -e $myprofile ] then echo "Qt Creator project '$myprofile' found" else echo "Qt Creator project '$myprofile' not found" exit fi echo "1/2: Creating Windows makefile" $myqmake $myprofile if [ -e Makefile ] then echo "Makefile created successfully" else echo "FAIL: $myqmake $myprofile" exit fi if [ -e $mymake ] then echo "Compiler '$mymake' found" else echo "Compiler '$mymake' not found directly" #exit fi echo "2/2: making makefile" $mymake echo $myexe if [ -e $myexe ] then echo "SUCCESS" else echo "FAIL" fi #Cleaning up rm *.o rm $myexe rm Makefile