~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Trying LAPACK lib 'C:\Program
Files\MATLAB\R2007a\extern\lib\win32\microsoft\libmwlapack.lib'
Writing library for siftrefinemx.mexw32
c:\users\mike\appdata\local\temp\mex_a97b690e-eec3-47be-bfb2-13aa33a93822\s
.text: undefined reference to '_dgesv'
C:\PROGRA~1\MATLAB\R2007A\BIN\MEX.PL: Error: Link of
'siftrefinemx.mexw32' failed.
??? Error using ==> mex at 206
Unable to complete successfully.
Error in ==> sift_compile at 56
mex('siftrefinemx.c',opts{:}) ;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm using Visual Studio 7 and MATLAB 7The problem can be solved by adding
__declspec(dllimport) ahead of the function declaration of dgesv:
#ifdef __cplusplus__
extern "C" {
__declspec(dllimport) extern int DGESV(int *n, int *nrhs, double *a, int *lda,
int *ipiv, double *b, int *ldb, int *info) ;
}
#else
__declspec(dllimport) extern int DGESV(int *n, int *nrhs, double *a, int *lda,
int *ipiv, double *b, int *ldb, int *info) ;
No comments:
Post a Comment