LAPACK Archives

[Lapack] Compilation Issue with LAPACKE

Dear Benoit,

the reason you're getting a conflict is because LAPACKE uses
complex number interface from the "complex.h" header file.
Here are the definitions:

One of the is "I" which is the imaginary unit.

The comment at the top of lapacke.h gives a suggestion of what
to do:

/* Complex types are structures equivalent to the
* Fortran complex types COMPLEX(4) and COMPLEX(8).
* One can also redefine the types with his own types
* for example by including in the code definitions like
* #define lapack_complex_float std::complex<float>
* #define lapack_complex_double std::complex<double>
* or define these types in the command line:
* -Dlapack_complex_float="std::complex<float>"
* -Dlapack_complex_double="std::complex<double>"

This should solve your problem.



On 7/4/13 8:32 AM, Benoit Chachuat wrote:
Dear LAPACK Team,

I recently tried to use the LAPACKE interface, but ran into an issue
that I would like to have your opinion.

It appears my program fails to compile when I include "lapacke.h"
because of some interaction with variables or functions named as the
single letter "I". I could reproduce the problem in one of the LAPACKE
example file (file attached), by adding a dummy (global) function as:
void I(){ return; };

giving the compilation error:
example_DGESV_rowmajor.c:83:6: error: expected identifier or ?(? before

I tried to have a look at the header file lapacke.h, ... but could not
locate a potential source for this problem.

Many thanks for your help,

Lapack mailing list

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or