user2277550
user2277550

Reputation: 619

Error while compiling with qmake, qt?

I tried to write a simple qt application and I get this error when I try to compile it

#include <QApplication>
#include <QTextEdit>

int main(int argv, char **args)
{
    QApplication app(argv, args);

    QTextEdit textEdit;
    textEdit.show();

    return app.exec();
}

_

qmake file.cpp

/home/j/qtf.cpp:4: Extra characters after test expression.
/home/j/qtf.cpp:6: Extra characters after test expression.
/home/j/qtf.cpp:8: Extra characters after test expression.
/home/j/qtf.cpp:11: Extra characters after test expression.

Where is the error

Upvotes: 1

Views: 546

Answers (1)

vahancho
vahancho

Reputation: 21250

In order to compile your application you have to:

  • Create a project file,
  • Generate makefiles,
  • Build the project.

To perform these steps simply invoke the corresponding commands:

qmake -project (generates project file)
qmake          (generates makefile)
make           (build the project)

Upvotes: 3

Related Questions