superlu icon indicating copy to clipboard operation
superlu copied to clipboard

slu_ddefs.h et al. declaring BLAS functions

Open wo80 opened this issue 9 months ago • 0 comments

I'm currently trying to use SuperLU in a C++ project and I'm getting the following error (Visual Studio):

slu_ddefs.h(270,12): error C2733: 'dgemv_': you cannot overload a function with 'extern "C"' linkage

The problem is that the SuperLU declaration

extern int dgemv_(char *, int *, int *, double *, double *, int *,
                  double *, int *, double *, double *, int *);

doesn't match the declaration used in the C++ code

extern void dgemv_(const char*, const int *, const int *, 
                   const double *, const double *, const int *,
                   const double *, const int *, const double *,
                   double *y, const int *);

Same problem with c, s and z variants.

IMHO, the best solution would be to not have those BLAS functions in the public headers at all. Why should SuperLU be responsible for providing these?

wo80 avatar Oct 04 '23 16:10 wo80