2

ubuntu 11.10でmiktex 2.8をコンパイルしようとしています。必要なライブラリをすべてインストールしました。しかし、ソースをコンパイルすると、次のようなエラーが発生します。

RepositoryTableModel.cpp:(.text+0x48b): undefined reference to QAbstractItemModel::headerData(int, Qt::Orientation, int) const'
RepositoryTableModel.cpp:(.text+0x4c8): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x4d7): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x4f1): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x518): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x527): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x545): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x570): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x57f): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x59d): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x5c8): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x5d7): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x5f5): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x620): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x62f): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x64d): undefined reference to `QString::free(QString::Data*)'

これらはほんの一部です。不足しているライブラリがいくつかあると思ったので、Qt SDK をインストールしましたが、それでも同じ問題が発生します。

誰でも助けることができますか?

4

1 に答える 1

3

これを試して:

apt-get install libqt4-dev

新しいデータ型や関数プロトタイプなどを宣言するヘッダー ファイルを提供するには、ライブラリ パッケージのバージョンが必要です-dev(ほとんどのライブラリ パッケージは-devバージョンを提供しますが、メイン パッケージでヘッダーを提供するものはわずかです)。

于 2012-01-18T23:28:02.303 に答える