Note that there are some explanatory texts on larger screens.

plurals
  1. POSimple Qt program builds but doesn't show output
    primarykey
    data
    text
    <p>I have just started learning Qt and tried to compile and run a simple program of hello world. The program builds without any issues and gives this output in <code>compiler output</code></p> <pre> Starting: /qtbuild/bin/qmake /home/ved/Qt/train1/train1.pro -spec /qtbuild/mkspecs/qws/linux-arm-g++ -r CONFIG+=debug Exited with code 0. Starting: /usr/bin/make -w make: Entering directory `/home/ved/Qt/train1' make: Nothing to be done for `first'. make: Leaving directory `/home/ved/Qt/train1' Exited with code 0. </pre> <p>but on trying to run the program, it only displays this:</p> <pre> Starting /home/ved/Qt/train1/train1... /home/ved/Qt/train1/train1 exited with code 255 </pre> <p>My code:</p> <pre> #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QLabel *label = new QLabel("Hello World!!!"); label->show(); return a.exec(); } </pre> <p>I am completely new to Qt building procedure and can't understand what is wrong.</p> <h1>Update</h1> <p>tried changing <code>QCoreApplication</code> to <code>QApplication</code>. No change.</p> <pre> Running build steps for project train1... Starting: /qtbuild//bin/qmake /home/ved/Qt/train1/train1.pro -spec /qtbuild/mkspecs/qws/linux-arm-g++ -r CONFIG+=debug Exited with code 0. Starting: /usr/bin/make -w make: Entering directory `/home/ved/Qt/train1' arm-linux-g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/qtbuild/mkspecs/qws/linux-arm-g++ -I. -I/qtbuild/include/QtCore -I/qtbuild/include/QtNetwork -I/qtbuild/include/QtGui -I/qtbuild/include -I. -I/usr/local/tslib-arm/include -o main.o main.cpp In file included from /qtbuild/include/QtCore/qobject.h:48, from /qtbuild/include/QtCore/qiodevice.h:46, from /qtbuild/include/QtCore/qxmlstream.h:45, from /qtbuild/include/QtCore/QtCore:3, from main.cpp:1: /qtbuild/include/QtCore/qstring.h:91: note: the mangling of 'va_list' has changed in GCC 4.4 arm-linux-g++ -Wl,-rpath,/qtbuild/lib -o train1 main.o -L/usr/local/tslib-arm/lib -L/qtbuild//lib -lQtGui -L/qtbuild//lib -L/usr/local/tslib-arm/lib -lQtNetwork -lQtCore -lpthread make: Leaving directory `/home/ved/Qt/train1' Exited with code 0. </pre> <p>I use Qt 4.6.3.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload