Hi,
I get quite a few compiling errors when producing the mex file. I am using Microsoft Visual C++ 2010 Express and MATLAB Version 7.11.0.584 (R2010b). After adding folders to path, I get:
LINK : warning LNK4044: unrecognized option '/lkernel32'; ignored
Creating library C:\Users\FRANCE~1\AppData\Local\Temp\mex_v3XQyS\templib.x and object C:\Users\FRANCE~1\AppData\Local\Temp\mex_v3XQyS\templib.exp
math.obj : error LNK2019: unresolved external symbol MLClose referenced in function CloseMathLink
math.obj : error LNK2019: unresolved external symbol MLNewPacket referenced in function WaitForReturnPacket
math.obj : error LNK2019: unresolved external symbol MLDisownString referenced in function WaitForReturnPacket
math.obj : error LNK2019: unresolved external symbol MLGetByteString referenced in function WaitForReturnPacket
math.obj : error LNK2019: unresolved external symbol MLNextPacket referenced in function WaitForReturnPacket
math.obj : error LNK2019: unresolved external symbol MLClearError referenced in function HandleMathLinkError
math.obj : error LNK2019: unresolved external symbol MLErrorMessage referenced in function HandleMathLinkError
math.obj : error LNK2019: unresolved external symbol MLEndPacket referenced in function OpenMathLink
math.obj : error LNK2019: unresolved external symbol MLPutString referenced in function OpenMathLink
math.obj : error LNK2019: unresolved external symbol MLPutFunction referenced in function OpenMathLink
math.obj : error LNK2019: unresolved external symbol MLOpen referenced in function OpenMathLink
math.obj : error LNK2019: unresolved external symbol MLPutDoubleArray referenced in function PutArrayToMathematica
math.obj : error LNK2019: unresolved external symbol MLPutSymbol referenced in function PutArrayToMathematica
math.obj : error LNK2019: unresolved external symbol MLDisownDoubleArray referenced in function GetArrayFromMathematica
math.obj : error LNK2019: unresolved external symbol MLGetDoubleArray referenced in function GetArrayFromMathematica
math.obj : error LNK2019: unresolved external symbol MLCheckFunction referenced in function GetArrayFromMathematica
math.obj : error LNK2019: unresolved external symbol MLGetType referenced in function GetArrayFromMathematica
math.mexw64 : fatal error LNK1120: 17 unresolved externals
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'math.mexw64' failed.
Thank you for your help.
Francesco
I've used this for a few years and find it works very well. I'm trying now to compile it on a Mac running OS 10.7.5
I'm using the command
mex -I/usr/include/ -lMLi3 math.c
and get
if: Expression Syntax.
ld: library not found for -lMLi3
collect2: ld returned 1 exit status
mex: link of ' "math.mexmaci64"' failed.
The library file is definitely in the directory I'm specifying. I see a note in the README that the library path needs to be on the (DY)LD_LIBRARY_PATH - could this be the problem? Any advice would be appreciated
I have the same problem when trying to install the packet. I am using Matlab2011b (64bit), Mathematica, 8.0 Windows 7. When I run "mex - setup" from Matlab, it shows
C:\PROGRA~1\MATLAB\2011B\BIN\MEX.PL: Error: 'â€“setup' not found.
Error using mex (line 206)
Unable to complete successfully.
I appreciate very much if anyone can help.
Comment only