#include <QApplication>
#include <QDebug>
int main(int argc,char*argv[]){
qDebug()<<"Helloworld";
return 0;
}
#include <QApplication>
#include <QDebug>
int main(int argc,char*argv[]){
QApplication a(argc,argv);
qDebug()<<"Helloworld";
return 0;
}
To copy to clipboard, switch view to plain text mode
sample_pr_commandline.pro file:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += first.cpp
namus@namus-desktop:~/Sample_Qt_progs/sample_pr_commandline$ ls
first.cpp sample_pr_commandline.pro
namus@namus-desktop:~/Sample_Qt_progs/sample_pr_commandline$ qmake
namus@namus-desktop:~/Sample_Qt_progs/sample_pr_commandline$ ls
first.cpp Makefile sample_pr_commandline.pro
namus@namus-desktop:~/Sample_Qt_progs/sample_pr_commandline$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o first.o first.cpp
g++ -Wl,-O1 -o sample_pr_commandline first.o -L/usr/lib -lQtGui -lQtCore -lpthread
gcc first.o all -o first
gcc: all: No such file or directory
make: *** [first] Error 1
Makefile is attached to this thread.
I am not getting why this error is coming & other programs are running fine.
Bookmarks