This forum has been archived. All content is frozen. Please use KDE Discuss instead.

CholmodSupernodalLLT compile errors

Tags: None
(comma "," separated)
calvinm
Registered Member
Posts
1
Karma
0

CholmodSupernodalLLT compile errors

Thu Feb 20, 2014 5:06 am
I'm getting compile errors for CholmodSupernodalLLT.

In function `Eigen::CholmodBase<Eigen::SparseMatrix<double, 0, int>, 1, Eigen::CholmodSupernodalLLT<Eigen::SparseMatrix<double, 0, int>, 1> >::CholmodBase()':
my_program.cpp:(.text._ZN5Eigen11CholmodBaseINS_12SparseMatrixIdLi0EiEELi1ENS_20CholmodSupernodalLLTIS2_Li1EEEEC2Ev[Eigen::CholmodBase<Eigen::SparseMatrix<double, 0, int>, 1, Eigen::CholmodSupernodalLLT<Eigen::SparseMatrix<double, 0, int>, 1> >::CholmodBase()]+0x43): undefined reference to `cholmod_start'

The program is really simple:
Code: Select all
#include <iostream>
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <Eigen/Cholesky>
#include <Eigen/SparseCholesky>
#include <Eigen/CholmodSupport>
#include "cholmod.h"
using Eigen::MatrixXd;
using Eigen::CholmodSupernodalLLT;
using Eigen::SparseMatrix;
int main() {
  MatrixXd m(2,2);
  m(0,0) = 3;
  m(1,0) = 2.5;
  m(0,1) = -1;
  m(1,1) = m(1,0) + m(0,1);
  CholmodSupernodalLLT<SparseMatrix<double> > cholesky;
  cholesky.compute(m.sparseView());
  std::cout << m << std::endl;
}


I'm compiling like this:
Code: Select all
g++ \
-I/opt/SuiteSparse/include \
-L/opt/SuiteSparse/lib \
-L/home/cmccarte/learning/SuiteSparse/metis-4.0 -lmetis \
-llapack -lcblas \
-lamd -lcamd -lccolamd -lcholmod -lcolamd \
-I/home/calvinm/waresoft/eigen/ \
my_program.cpp -o my_program


What's so strange is that /optSuiteSparse/lib really does include all the ".a" files.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
you need to link to libsuitesparse.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]