I am trying to run a simple console application (Hello World program) on Qt 5.6.0. Here is the code:
#include <QCoreApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "Hello World";
return a.exec();
}
But it's generating error. ([main.o]error 2).
11:37:44: Running steps for project test... 11:37:44: Configuration unchanged, skipping qmake step. 11:37:44: Starting: "/usr/bin/make" /Applications/Xcode 7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -isysroot /Applications/Xcode 7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mFile Doesn't Exist, Will Create: /Applications/Xcode Invalid Arguments -version-min=10.7 -Wall -W -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../Qt5.6.0/5.6/clang_64/lib/QtWidgets.framework/Headers -I../Qt5.6.0/5.6/clang_64/lib/QtGui.framework/Headers -I../Qt5.6.0/5.6/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode -I7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode -I7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers/ -I. -I../Qt5.6.0/5.6/clang_64/mkspecs/macx-clang -F/Users/macwaves/Qt5.6.0/5.6/clang_64/lib -o main.o ../test/main.cpp /bin/sh: -c: line 0: unexpected EOF while looking for matching `'' /bin/sh: -c: line 1: syntax error: unexpected end of file make: *** [main.o] Error 2 11:37:44: The process "/usr/bin/make" exited with code 2. Error while building/deploying project test (kit: Desktop Qt 5.6.0 clang 64bit) When executing step "Make" 11:37:44: Elapsed time: 00:00.
I tried to set PATH (/Users/macwaves/Qt5.6.0/5.6/clang_64/bin). Renamed my Xcode 7.app to Xcode7.app but, problem still persists.
Can anybody help?
Here is a snapshot of my problem :