From: Cédric Devivier on 9 Feb 2010 08:02 Hello, I try to compile a mex file using matlab R2009b 64bits with Visual Studio 2008 (Microsoft .NET runtime 3.5 sp1) under Windows 7 64bits and I encounter this problem. >>mex -g mf2.cpp graph.cpp maxflow.cpp Microsoft (R) Incremental Linker Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. C:\USERS\CDRIC~1\APPDATA\LOCAL\TEMP\MEX_NC~1\mf2.obj C:\USERS\CDRIC~1\APPDATA\LOCAL\TEMP\MEX_NC~1\graph.obj C:\USERS\CDRIC~1\APPDATA\LOCAL\TEMP\MEX_NC~1\maxflow.obj Library creation C:\USERS\CDRIC~1\APPDATA\LOCAL\TEMP\MEX_NC~1\templib.x and object C:\USERS\CDRIC~1\APPDATA\LOCAL\TEMP\MEX_NC~1\templib.exp mf2.obj : error LNK2019: unresolved external symbol _mxCreateNumericArray_700 referenced in function "void __cdecl mf2(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?mf2@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) mf2.obj : error LNK2019: unresolved external symbol _mxGetM referenced in function "void __cdecl mf2(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?mf2@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) mf2.obj : error LNK2019: unresolved external symbol _mxGetN referenced in function "void __cdecl mf2(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?mf2@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) mf2.obj : error LNK2019: unresolved external symbol _mxGetPr referenced in function "void __cdecl mf2(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?mf2@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) mf2.mexw64 : fatal error LNK1120: 4 unresolved externals C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Link of 'mf2.mexw64' failed. ??? Error using ==> mex at 221 Unable to complete successfully. I tried all the things in the newscentral but none of them resolved it. Thank you for your help. Cédric
From: Cédric Devivier on 5 Mar 2010 06:50 In fact, the problem was that I should install Visual studio first and then matlab else it is not recognized properly.
|
Pages: 1 Prev: Does the line intersect the patch surface ? Next: how to insert picture to Matlab GUI |