Bonjour,
J’ai un fichier .cpp qui inclue une librairie définie par l’utilisateur matrix.hpp. Le fichier compile correctement en C++ et Matlab. Par contre si j’essaye de créer un mex file en Matlab pour multiply3D.cpp j’obtiens l’erreur suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 >> mex -c multiply3D.cpp >> mex multiply3D.cpp Création de la bibliothèque D:\DOCUME~1\IB224157\LOCALS~1\TEMP\MEX_VY~1\templib.x et de l'objet D:\DOCUME~1\IB224157\LOCALS~1\TEMP\MEX_VY~1\templib.exp multiply3D.obj : error LNK2019: symbole externe non résolu _dgemm référencé dans la fonction "void __cdecl mexFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)" (?mexFunction@@YAXHQAPAUmxArray_tag@@H0@Z) multiply3D.mexw32 : fatal error LNK1120: 1 externes non résolus C:\PROGRA~1\MATLAB\R2008B\BIN\MEX.PL: Error: Link of 'multiply3D.mexw32' failed. ??? Error using ==> mex at 213 Unable to complete successfully.
J’utilise Matlab 7.7 version 2008b et le compilateur [2] Microsoft Visual C++ 2008 Express in C:\Program Files\Microsoft Visual Studio 9.0. Je devrais mentionner aussi que tous les autres fichiers .cpp qui incluent que des librairies standard s’exécutent correctement. Aussi, si j’utilise la function multiply3D dans un script Matlab il retourne pas des erreurs mais il retourne un résultat erroné : multiply3D(a,b) =a, pour tous a,b.
Comment je pourrais résoudre cette erreur ?
je vous remercie beaucoup !
Partager