내 프로젝트에 Eigen3를 사용하려고하고 내가 리눅스 민트 17.3을 사용하고Eigen3 리눅스 민트 17.3의 repo에서, 희소 행렬이
/usr/include/eigen3/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h:246:11: error: ‘SparseMatrix’ does not name a type
typedef SparseMatrix<Scalar, 0, StorageIndex> ReturnType;
CMake를 사용하여 구축하고 확인하려고 할 때이 오류가 이름이 없습니다. 나는 eigen2와 eigen3 라이브러리를 모두 갖고 있으며, CMake가 eigen3을 선택하고 있다고 확신한다 (특히 위의 오류 메시지가 주어짐). sudo apt-get install libeigen3-dev
명령을 사용하여 eigen3을 설치했습니다. 내가 apt-cache show libeigen3-dev
를 실행하면 나는
Package: libeigen3-dev
Priority: extra
Section: universe/libdevel
Installed-Size: 5130
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Science Maintainers <[email protected]>
Architecture: all
Source: eigen3
Version: 3.3~beta1-2
Depends: pkg-config
Suggests: libeigen3-doc, libmrpt-dev
Filename: pool/universe/e/eigen3/libeigen3-dev_3.3~beta1-2_all.deb
Size: 662650
MD5sum: bad08ef7b1d166c5bc9903e510a9fb68
SHA1: ef35745fcd047f1a1f18834e02ccef1476d7407c
SHA256: 5c73d97dca2d950ce51bde451deed4b6508b2f6cca9b9b6563218591e029f17b
Description-en: lightweight C++ template library for linear algebra
Eigen 3 is a lightweight C++ template library for vector and matrix math,
a.k.a. linear algebra.
.
Unlike most other linear algebra libraries, Eigen 3 focuses on the simple
mathematical needs of applications: games and other OpenGL apps, spreadsheets
and other office apps, etc. Eigen 3 is dedicated to providing optimal speed
with GCC. A lot of improvements since 2-nd version of Eigen.
Description-md5: 71025bd67be9e83075fd5a0e7ab822a2
Homepage: http://eigen.tuxfamily.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 9m
가 여기에 최소한의 코드 조각의 수 :
#include <unsupported/Eigen/KroneckerProduct>
int main() {
return 0;
}
g++ -std=c++11 -I /usr/local/include/eigen3 hello.cpp -o hello
로 컴파일 :
In file included from /usr/local/include/eigen3/unsupported/Eigen/KroneckerProduct:30:0,
from hello.cpp:4:
/usr/local/include/eigen3/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h:246:11: error: ‘SparseMatrix’ does not name a type
typedef SparseMatrix<Scalar, 0, StorageIndex> ReturnType;
공식 버전은 어떻습니까? – kangshiyin
나는 mercurial repo에서 공식 버전을 테스트했으며 같은 오류가 발생했습니다. – BlazePascal
3.2.9 같은 이전 버전은 어떻습니까? 어쨌든 '지원되지 않습니다.' – kangshiyin