1 頁 (共 1 頁)

[SOLVED]我的 cmake with "qt4" use 編不起來

文章發表於 : 週三 11月 10, 2010 10:10 am
paar
cmake-2.8.1-r2
沒有 qt4 的 use 是編譯 OK 的
但要用 kde 就一定得要它 with qt4
google 和 gentoo bugzilla 看來沒什麼人和我一樣的問題
要請看得懂 cmake 原碼的人幫一下要怎麼解這個問題

make cmake 時:
[ 71%] Built target cmake
Scanning dependencies of target CMakeLibTests
In file included from /var/tmp/portage/dev-util/cmake-2.8.1-r2/work/cmake-2.8.1/Source/QtDialog/CMakeSetup.cxx:12:
/var/tmp/portage/dev-util/cmake-2.8.1-r2/work/cmake-2.8.1/Source/QtDialog/QCMake.h:36: error: field 'Strings' has incomplete type
/var/tmp/portage/dev-util/cmake-2.8.1-r2/work/cmake-2.8.1/Source/QtDialog/QCMake.h:139: error: field 'AvailableGenerators' has incomplete type

[ 71%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/CMakeLibTests.o
[ 71%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testUTF8.o
[ 72%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testXMLParser.o
[ 72%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.o
[ 72%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testXMLSafe.o
make[2]: *** [Source/QtDialog/CMakeFiles/cmake-gui.dir/CMakeSetup.o] Error 1
make[1]: *** [Source/QtDialog/CMakeFiles/cmake-gui.dir/all] Error 2


/var/tmp/portage/dev-util/cmake-2.8.1-r2/work/cmake-2.8.1/Source/QtDialog/QCMake.h 的 36 行附近:
struct QCMakeProperty
{
enum PropertyType { BOOL, PATH, FILEPATH, STRING };
QString Key;
QVariant Value;
QStringList Strings;
QString Help;
PropertyType Type;
bool Advanced;
bool operator==(const QCMakeProperty& other) const
{
return this->Key == other.Key;
}
bool operator<(const QCMakeProperty& other) const
{
return this->Key < other.Key;
}
};

139行附近:
protected:
cmake* CMakeInstance;

static void progressCallback(const char* msg, float percent, void* cd);
static void errorCallback(const char* msg, const char* title,
bool&, void* cd);
bool SuppressDevWarnings;
QString SourceDirectory;
QString BinaryDirectory;
QString Generator;
QStringList AvailableGenerators;
QString CMakeExecutable;
};

Re: 我的 cmake with "qt4" use 編不起來

文章發表於 : 週三 11月 10, 2010 10:44 am
paar
qt-gui 重編過了還不行,
最後找到 qstringlist.h 這個檔是屬於 qt-core 的,
重編 qt-core 後,cmake 就編成功了。