I installed QT4 Creator in / usr / programs / qt, add in PATH / usr / programs / qt / bin, QTDIR = / usr / programs / qt, LD_LIBRARY_PATH = $ QTDIR / lib, as well as for MANPATH and export. The problem is that the demos work fine, but when I create a new project in a different directory, for example / home / Jane / it does not work, I got errors, for example
/ home / jane / test-embedded desktop /../ test / main.cpp: 1: Error: QApplication: There is no such file or directory / home / Jane / test -build-desktop /../ test / main.cpp : 2: Error: QLabel: No such file or directory
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
Can someone help me?
source
share