What does this error mean?
-
Hello everybody, can anyone help with this error: (it is the first part of the error message!)
20:49:53: Running steps for project analogclock...
20:49:53: Starting: "/Users/ines/Qt5.0.1/5.0.1/clang_64/bin/qmake" /Users/ines/Qt5.0.1/5.0.1/clang_64/examples/gui/analogclock/analogclock.pro -r -spec macx-g++40 CONFIG+=debug CONFIG+=x86_64 CONFIG+=declarative_debug CONFIG+=qml_debug
20:49:54: The process "/Users/ines/Qt5.0.1/5.0.1/clang_64/bin/qmake" exited normally.
20:49:54: Starting: "/usr/bin/make" -w
make: Entering directory `/Users/ines/Qt5.0.1/5.0.1/clang_64/examples/gui/analogclock-build-Desktop_Qt_5_0_1_clang_64bit-Debug'
g++-4.0 -c -pipe -mmacosx-version-min=10.6 -g -gdwarf-2 -Wall -W -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../../mkspecs/macx-g++40 -I../analogclock -I../rasterwindow -I../../../include -I../../../include/QtGui -I../../../lib/QtGui.framework/Versions/5/Headers -I../../../include/QtCore -I../../../lib/QtCore.framework/Versions/5/Headers -I. -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I. -o rasterwindow.o ../rasterwindow/rasterwindow.cpp
../../../include/QtCore/qgenericatomic.h:96: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:102: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:108: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:116: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:127: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:133: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:148: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:156: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:163: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:173: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:184: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:192: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:199: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:208: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:219: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:227: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qgenericatomic.h:234: warning: 'gnu_inline' attribute directive ignored
../../../include/QtCore/qstring.h: In member function 'QString QString::arg(int, int, int, QChar) const':
../../../include/QtCore/qstring.h:774: warning: ignoring return value of 'QString QString::arg(qlonglong, int, int, QChar) const', declared with attribute warn_unused_result
../../../include/QtCore/qstring.h: In member function 'QString QString::arg(uint, int, int, QChar) const':
../../../include/QtCore/qstring.h:776: warning: ignoring return value of 'QString QString::arg(qulonglong, int, int, QChar) const', declared with attribute warn_unused_result
../../../include/QtCore/qstring.h: In member function 'QString QString::arg(long int, int, int, QChar) const':
../../../include/QtCore/qstring.h:778: warning: ignoring return value of 'QString QString::arg(qlonglong, int, int, QChar) const', declared with attribute warn_unused_result
../../../include/QtCore/qstring.h: In member function 'QString QString::arg(ulong, int, int, QChar) const':
../../../include/QtCore/qstring.h:780: warning: ignoring return value of 'QString QString::arg(qulonglong, int, int, QChar) const', declared with attribute warn_unused_result
../../../include/QtCore/qstring.h: In member function 'QString QString::arg(short int, int, int, QChar) const':
../../../include/QtCore/qstring.h:782: warning: ignoring return value of 'QString QString::arg(qlonglong, int, int, QChar) const', declared with attribute warn_unused_result
../../../include/QtCore/qstring.h: In member function 'QString QString::arg(ushort, int, int, QChar) const':
../../../include/QtCore/qstring.h:784: warning: ignoring return value of 'QString QString::arg(qulonglong, int, int, QChar) const', declared with attribute warn_unused_result
../../../include/QtCore/qstring.h: In member function 'QByteArray& QByteArray::append(const QString&)': -
Hello, Thanks for replying. My previous message was the output I got when trying to compile an example of Qt. I got a very long warning/error message and the program did not work.
I tried a simpler code:
@
#include <QApplication>
#include <QPushButton>int main(int argc, char *argv[])
{
QApplication app(argc, argv);QPushButton bouton("Hello World!"); bouton.show(); return app.exec();
}
@It does not work and the error message is:
@
../test/main.cpp:1:24: error: QApplication: No such file or directory
../test/main.cpp:2:23: error: QPushButton: No such file or directory
../test/main.cpp: In function 'int main(int, char**)':
../test/main.cpp:6: error: 'QApplication' was not declared in this scope
../test/main.cpp:6: error: expected;' before 'app' ../test/main.cpp:8: error: 'QPushButton' was not declared in this scope ../test/main.cpp:8: error: expected
;' before 'bouton'
../test/main.cpp:9: error: 'bouton' was not declared in this scope
../test/main.cpp:11: error: 'app' was not declared in this scope
../test/main.cpp: At global scope:
../test/main.cpp:4: warning: unused parameter 'argc'
../test/main.cpp:4: warning: unused parameter 'argv'
make: *** [main.o] Error 1
@
Any hints? Thanks a lot :)[Edit: Added @ tags for formatting -- mlong]
-
Hi,
since you'r using Qt5 add QT += qtwidgets to you pro file
-
@SGaist: I added QT += qtwidgets and here is the error message:
Project ERROR: Unknown module(s) in QT: qtwidgets
make: *** [Makefile] Error 3
make: Leaving directory `/Users/ines/test-build-Desktop_Qt_5_0_1_clang_64bit-Debug'
10:13:10: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project test (kit: Desktop Qt 5.0.1 clang 64bit)
When executing step 'Make' -
Your pro file does not contain the minimal stuff to build a Qt project. Since your trying things, delete that project and create a new Qt Gui Application with QtCreator. This will give you a starting point to test code
-
I created a Qt Gui Application but again I have this huge list of warnings as output and then this
10:45:48: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project test (kit: Desktop Qt 5.0.1 clang 64bit)
When executing step 'Make'