2010-05-11 12 views
0

我安裝我的Fedora Core 12 x64系統上MTL,而是構建一個應用程序,我得到以下錯誤時:C++ MTL庫的dimension.h錯誤?

In file included from /usr/local/include/mtl/matrix.h:41, 
       from /usr/local/include/mtl/mtl.h:40, 
       from ltiSystem.hxx:4, 
       from strTools.hxx:4, 
       from ff.cxx:3: 
/usr/local/include/mtl/envelope2D.h:72: error: declaration of ‘typedef struct mtl::twod_tag mtl::envelope2D<T>::dimension’ 
/usr/local/include/mtl/dimension.h:19: error: changes meaning of ‘dimension’ from ‘class mtl::dimension<typename mtl::dense1D<T, 0>::size_type, 0, 0>’ 
make[1]: *** [ff.o] Error 1 

這將在MTL意味着一個錯誤。我已更改爲不同的MTL版本,問題仍然存在,但在Google上沒有正確答案。 我使用g ++編譯器。

有沒有人有clye?

回答

0

問題出在您的代碼中,幾乎百分百保證。

尋找與維含糊的聲明,即 typedef mtl::envelope2D<T>::dimension dimension

0

嗯,我也這麼認爲,但它也有捆綁與MTL的測試套件的發生。

0

今天我有同樣的問題與MTL的MTL-2.1.2-23.tentative.tar.gz版本。

解決的辦法是改變:

typedef dimension<size_type> dim_type; 

typedef mtl::dimension<size_type> dim_type; 

在envelope2D.h文件。 我也不得不在light1D.h的開頭添加

#include <cstddef>