c++ - How to call desgv from LAPACK -
update
error: void value not ignored ought be
new update
i tried make experimental function test dgesv, says can't find -llapack now, weird because installed through yum.
i'm having trouble calling dgesv lapack. currently, i've tried this:
extern "c" { void dgesv(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info); } dgesv(&lengtha, &widthf, a, &leadingdema, permmat, b, &leadingdemb, &errorcheck);
the problem when compile g++ program -llapack
, compiler yells @ me.
what doing wrong?
there couple of problems code posted. first declaration of dgesv
missing semi-colon. passing a
, b
, permmat
incorrectly. brackets should used when variables declared or defined below
char a[10]; void f(char a[]);
the following changes should take care of compilation issues long code posted actual code using.
extern "c" { void dgesv(int *lengtha, int *widthf, double *a, int *leadingdema, double *permmat, double *b, int *leadingdemb, int *errorcheck); // <-- semi-colon } dgesv(&lengtha, &widthf, a, &leadingdema, permmat, b, &leadingdemb, &errorcheck); // ^^ ^^ ^^
Comments
Post a Comment