これは非常に基本的な質問です。このフォーラムの履歴を検索しましたが、C/C++ でこのアプリに直接適用できるものは見つかりませんでした。Fedora20 でコードをビルドしています。yum を使用してインストールされた次のライブラリがあります。
qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtscript-devel
qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel
[root@localhost subsurface]# qmake-qt5 --version
QMake version 3.0
Using Qt version 5.4.0 in /usr/lib64
私は次のようにqmakeを使用します:
make-qt5
エラーは表示されません。make file は OK で、生成されたヘッダー ファイルは OK だと思います。
作成時に、次の Qt 関連のエラー:
[root@localhost subsurface]# make
(1)
compiling main.cpp
In file included from /usr/include/QtGui/QTextEdit:1:0,
from .uic/ui_mainwindow.h:26,
from qt-ui/mainwindow.h:14,
from main.cpp:11:
/usr/include/QtGui/qtextedit.h:235:16: error: ‘QPrinter’ has not been declared
void print(QPrinter *printer) const;
^
(2)
In file included from qt-ui/tableview.h:10:0,
from .uic/ui_diveplanner.h:26,
from qt-ui/diveplanner.h:140,
from .uic/ui_mainwindow.h:30,
from qt-ui/mainwindow.h:14,
from main.cpp:11:
.uic/ui_tableview.h: In member function ‘void Ui_TableView::retranslateUi(QGroupBox*)’:
.uic/ui_tableview.h:49:87: error: ‘UnicodeUTF8’ is not a member of ‘QApplication’
TableView->setWindowTitle(QApplication::translate("TableView", "GroupBox", 0, QApplication::UnicodeUTF8));
Qt ライブラリが 1 つまたは 2 つ不足していると思われます。QPrinter と UnicodeUTF8 を含むライブラリ ファイルはどれですか? 何かアドバイスをお願いします。よろしく、ウィレム