Zdravím všechny, rád bych Vás požádal o pomoc.
Nějakou dobu si zkouším jeden Qt tutoriál v Ubuntu (
https://doc.qt.io/qt-5/qtwidgets-mainwindows-application-example.html ). Po napsání programu jsem spustil qmake, který vytvořil Makefile, leč v něm nebylo umístění některých tříd. Když jsem na to po trošce bádání přišel, dopsal jsem do něj příslušné umístění ručně přidáním " -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/" do proměnné "INCPATH" a začal jsem kompilovat s pomocí příkazu make. Po odstranění standardních překlepů a odstranění kódu, který se pravděpodobně vztahuje k verzi 5.9 a ne 5.5, která je v Ubuntu nainstalovaná, se ale objevily chybové hlášení, u kterých sice možná trošku tuším, co znamenají, ale netuším, jak se jich zbavit. Pokud někdo víte, v čem je problém, budu rád, když dáte vědět. Díky za odpovědi.
Některé chybové hlášení (všechny se nevejdou do příspěvku. Ze stejného důvodu jsem sem zatím nedal Makefile):
g++ -m64 -Wl,-O1 -o Main\ window main.o main_window.o qrc_application.o moc_main_window.o -L/usr/X11R6/lib64 -lQt5Gui -lQt5Core -lGL -lpthread
main.o: In function `main':
main.cpp:(.text.startup+0x4e): undefined reference to `QApplication::QApplication(int&, char**, int)'
main.cpp:(.text.startup+0x23b): undefined reference to `QWidget::show()'
main.cpp:(.text.startup+0x240): undefined reference to `QApplication::exec()'
main.cpp:(.text.startup+0x276): undefined reference to `QMainWindow::~QMainWindow()'
main.cpp:(.text.startup+0x286): undefined reference to `QApplication::~QApplication()'
main.cpp:(.text.startup+0x2fe): undefined reference to `QMainWindow::~QMainWindow()'
main.cpp:(.text.startup+0x311): undefined reference to `QApplication::~QApplication()'
main_window.o: In function `MainWindow::documentWasModified()':
main_window.cpp:(.text+0x9): undefined reference to `QPlainTextEdit::document() const'
main_window.o: In function `MainWindow::about()':
main_window.cpp:(.text+0x10a): undefined reference to `QMessageBox::about(QWidget*, QString const&, QString const&)'
main_window.o: In function `MainWindow::createActions()':
main_window.cpp:(.text+0x219): undefined reference to `QMainWindow::menuBar() const'
main_window.cpp:(.text+0x224): undefined reference to `QMenuBar::addMenu(QString const&)'
main_window.cpp:(.text+0x270): undefined reference to `QMainWindow::addToolBar(QString const&)'
main_window.cpp:(.text+0x38f): undefined reference to `QAction::QAction(QIcon const&, QString const&, QObject*)'
main_window.cpp:(.text+0x3c3): undefined reference to `QAction::setShortcuts(QKeySequence::StandardKey)'
main_window.cpp:(.text+0x3ef): undefined reference to `QAction::setStatusTip(QString const&)'
main_window.cpp:(.text+0x416): undefined reference to `QAction::triggered(bool)'
main_window.cpp:(.text+0x4a1): undefined reference to `QAction::staticMetaObject'
main_window.cpp:(.text+0x4c8): undefined reference to `QWidget::addAction(QAction*)'
main_window.cpp:(.text+0x4d7): undefined reference to `QWidget::addAction(QAction*)'
main_window.cpp:(.text+0x5c3): undefined reference to `QAction::QAction(QIcon const&, QString const&, QObject*)'
...
moc_main_window.o:(.data.rel.ro._ZTV10MainWindow[_ZTV10MainWindow]+0x200): undefined reference to `non-virtual thunk to QWidget::sharedPainter() const'
moc_main_window.o:(.data.rel.ro+0x0): undefined reference to `QMainWindow::staticMetaObject'
collect2: error: ld returned 1 exit status
Makefile:143: recipe for target 'Main window' failed
make: *** [Main window] Error 1