#test.proQT += coreQT += guiTARGET = testTEMPLATE = appDESTDIR = buildOBJECTS_DIR = tmpMOC_DIR = tmpDEPENDPATH += .SOURCES += main.cpp
C++ (Qt)// main.cpp #include <QtGui>#include <QApplication>#include <QDebug> int main(int argc, char *argv[]){ QApplication app(argc, argv); qDebug() << "Hello world!";}
Bash#!/bin/sh## APPNAME=test BASEDIR="./" QT_WIN_INSTALL_DIR=/home/costa/qt-4.8.4-winQT_LIN_INSTALL_DIR=/usr/local/Trolltech/Qt-4.8.4 export LD_LIBRARY_PATH=$QT_LIN_INSTALL_DIR/lib:$LD_LIBRARY_PATHexport PATH=$QT_LIN_INSTALL_DIR/bin:$PATHexport QT_LINUX_BIN_PATH=$QT_LIN_INSTALL_DIR/binexport QT_WIN_INCLUDE_PATH=$QT_WIN_INSTALL_DIR/includeexport QT_WIN_LIB_PATH=$QT_WIN_INSTALL_DIR/lib qmake -set QT_WIN_INCLUDE_PATH $QT_WIN_INCLUDE_PATHqmake -set QT_WIN_LIB_PATH $QT_WIN_LIB_PATH qmake $APPNAME.pro -spec win32-x-g++ -rmake
i586-mingw32msvc-g++ -c -O2 -fexceptions -mthreads -Wall -Wextra -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NO_DYNAMIC_CAST -I'../../../../qt-4.8.4-win/include/QtCore' -I'../../../../qt-4.8.4-win/include/QtGui' -I'../../../../qt-4.8.4-win/include' -I'../../../../qt-4.8.4-win/include/ActiveQt' -I'tmp' -I'/usr/local/Trolltech/Qt-4.8.4/mkspecs/win32-x-g++' -o tmp/main.o main.cppIn file included from ../../../../qt-4.8.4-win/include/QtGui/qcolor.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qpalette.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qpalette.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qwidget.h:49, from ../../../../qt-4.8.4-win/include/QtGui/qwidget.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/widgets/qabstractspinbox.h:45, from ../../../../qt-4.8.4-win/include/QtGui/qabstractspinbox.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/styles/qstyleoption.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qstyleoption.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/itemviews/qabstractitemdelegate.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qabstractitemdelegate.h:1, from ../../../../qt-4.8.4-win/include/QtGui/QtGui:4, from main.cpp:1:../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qcolor.h:274: warning: ‘QDataStream& operator<<(QDataStream&, const QColor&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qcolor.h:275: warning: ‘QDataStream& operator>>(QDataStream&, QColor&)’ redeclared without dllimport attribute: previous dllimport ignoredIn file included from ../../../../qt-4.8.4-win/include/QtGui/qpainterpath.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qtransform.h:45, from ../../../../qt-4.8.4-win/include/QtGui/qtransform.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qbrush.h:51, from ../../../../qt-4.8.4-win/include/QtGui/qbrush.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qpalette.h:47, from ../../../../qt-4.8.4-win/include/QtGui/qpalette.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qwidget.h:49, from ../../../../qt-4.8.4-win/include/QtGui/qwidget.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/widgets/qabstractspinbox.h:45, from ../../../../qt-4.8.4-win/include/QtGui/qabstractspinbox.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/styles/qstyleoption.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qstyleoption.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/itemviews/qabstractitemdelegate.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qabstractitemdelegate.h:1, from ../../../../qt-4.8.4-win/include/QtGui/QtGui:4, from main.cpp:1:../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qpainterpath.h:249: warning: ‘QDataStream& operator<<(QDataStream&, const QPainterPath&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qpainterpath.h:250: warning: ‘QDataStream& operator>>(QDataStream&, QPainterPath&)’ redeclared without dllimport attribute: previous dllimport ignoredIn file included from ../../../../qt-4.8.4-win/include/QtGui/qkeysequence.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qwidget.h:57, from ../../../../qt-4.8.4-win/include/QtGui/qwidget.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/widgets/qabstractspinbox.h:45, from ../../../../qt-4.8.4-win/include/QtGui/qabstractspinbox.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/styles/qstyleoption.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qstyleoption.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/itemviews/qabstractitemdelegate.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qabstractitemdelegate.h:1, from ../../../../qt-4.8.4-win/include/QtGui/QtGui:4, from main.cpp:1:../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qkeysequence.h:208: warning: ‘QDataStream& operator<<(QDataStream&, const QKeySequence&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/kernel/qkeysequence.h:209: warning: ‘QDataStream& operator>>(QDataStream&, QKeySequence&)’ redeclared without dllimport attribute: previous dllimport ignoredIn file included from ../../../../qt-4.8.4-win/include/QtGui/qpen.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextformat.h:50, from ../../../../qt-4.8.4-win/include/QtGui/qtextformat.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextcursor.h:47, from ../../../../qt-4.8.4-win/include/QtGui/qtextcursor.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/widgets/qlineedit.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qlineedit.h:1, from ../../../../qt-4.8.4-win/include/QtGui/QtGui:47, from main.cpp:1:../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qpen.h:124: warning: ‘QDataStream& operator>>(QDataStream&, QPen&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/painting/qpen.h:125: warning: ‘QDataStream& operator<<(QDataStream&, const QPen&)’ redeclared without dllimport attribute: previous dllimport ignoredIn file included from ../../../../qt-4.8.4-win/include/QtGui/qtextformat.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextcursor.h:47, from ../../../../qt-4.8.4-win/include/QtGui/qtextcursor.h:1, from ../../../../qt-4.8.4-win/include/QtGui/../../src/gui/widgets/qlineedit.h:46, from ../../../../qt-4.8.4-win/include/QtGui/qlineedit.h:1, from ../../../../qt-4.8.4-win/include/QtGui/QtGui:47, from main.cpp:1:../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextformat.h:117: warning: ‘QDataStream& operator<<(QDataStream&, const QTextLength&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextformat.h:118: warning: ‘QDataStream& operator>>(QDataStream&, QTextLength&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextformat.h:363: warning: ‘QDataStream& operator<<(QDataStream&, const QTextFormat&)’ redeclared without dllimport attribute: previous dllimport ignored../../../../qt-4.8.4-win/include/QtGui/../../src/gui/text/qtextformat.h:364: warning: ‘QDataStream& operator>>(QDataStream&, QTextFormat&)’ redeclared without dllimport attribute: previous dllimport ignoredi586-mingw32msvc-g++ -Wl,-s -mthreads -Wl,-subsystem,windows -o build/test.exe tmp/main.o -L'/home/costa/qt-4.8.4-win/lib' -lmingw32 -lqtmain -lQtGui4 -lQtCore4