How to compile CHOLMOD library (SuiteSparse) from IDE

3.4k Views Asked by At

For some time I am trying to create a static CHOLMOD lib from SuiteSparse Each other library (f.ex. Umfpack) can be easiy compiled from IDE (I used Code::Blocks on Linux and Visual Studio on Windows). However when trying to compile CHOLMOD I get bunch of syntax errors like:

t_cholmod_triplet.c(21): error C2061: syntax error : identifier 'TEMPLATE'

I investigated that there are some #defines missing (like PATTERN, REAL defines) and therefore those definitions of TEMPLATE are invisible. I searched for them in files and in makefiles but found nothing. However when typing make (on Linux) library compiles just fine. What am I missing?

2

There are 2 best solutions below

0
On

You can use SuiteSparse METIS for Windows package: https://github.com/jlblancoc/suitesparse-metis-for-windows

Credit: Jose Luis Blanco (Universidad de Almeria); Jerome Esnault (INRIA).

0
On

Actually the problem exists because of "templates" created in C. It requires to recompile the same code multiple times with different flags. I have written the VS NMakefile based on the original makegile and it compiled it seamlessly.