Dear Wotao,
Thanks for your support. I downloaded the mexw64 file and saved it in
the same folder where gurobi_mex.c was kept (i.e. the folder
downloaded from SourceForge for gurobi_mex_v1.61. I then started
Matlab and added this folder (gurobi_mex_v1.61) to the path and
thereafter following the instructions on the convexoptimization site
tried the command 'compile_mex', with the following results:
----------------------
>> mex -setup
Please choose your compiler for building external interface (MEX)
files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Microsoft Visual C++ 2008 Express in C:\Program Files
(x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 Express
Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
*****************************************************************************
Error: Could not find the 64-bit compiler. This may indicate that
the
"X64 Compilers and Tools" or the Microsoft Windows Software
Development Kit (SDK) is not installed. To build 64-bit MEX-
files
Microsoft Visual C++ 2008 Express Edition requires that these
two
packages are installed properly.
*****************************************************************************
Trying to update options file: C:\Users\patjon\AppData\Roaming
\MathWorks\MATLAB\R2009a\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2009a\bin\win64\mexopts
\msvc90freeopts.bat
Done . . .
**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near
future
you will be required to update your code to utilize the
new
API. You can find more information about this at:
http://www.mathworks.com/support/solutions/data/
1-5C27B9.html?solution=1-5C27B9
Building with the -largeArrayDims option enables the new
API.
**************************************************************************
>> compile_mex
Have you run "mex -setep" to set up a C compiler for Matlab? Y/N [Y]:
y
To build gurobi_mex.mexw64, we are calling:
mex -O -largeArrayDims -I"C:\gurobi461\win64\include" "C:\Users\patjon
\Dropbox\PROJECTS\Computational modeling
\gurobi_mex_v1.61\gurobi_mex.c" "C:\gurobi461\win64\lib\gurobi46.lib"
"C:\Users\patjon\Dropbox\PROJECTS\Computational modeling
\gurobi_mex_v1.61\libut\libut_win64.lib"
Error: Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2009A\BIN\
MEX.PL: Error: Unable to locate
compiler.
??? Error using ==> mex at 218
Unable to complete successfully.
Error in ==> compile_mex at 90
eval(cmpl_cmd);
----------------
Before that, I also tried without first running mex -setup, identical
results.
I also thereafter tried with or without setting the path to c:
\gurobi461 (where gurobi itself is located) and to also run the
following command: 'gurobi_mex' with the following results with or
without gurobi461 on the path:
----------------
>> gurobi_mex
Gurobi Mex Version 1.61. Gurobi Library Version 4.6.1.
Check input & ouput.
??? Error using ==> gurobi_mex
8 or 9 input required.
--------------------
Any suggestions would be appreciated, I am a wet-lab biologist so it
is not straightforward to sort it out. If the version of Matlab is the
problem, I will need more time to fix it as our service contract has
run out so we don't receive updates any longer.
Thanks for your help, Patrik
On Feb 1, 7:00 pm, Wotao Yin <
wotao....@gmail.com> wrote:
> Patrik,
>
> That's strange. In Matlab R2010b, "mex -setup" gives two options.
>
> [1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files
> (x86)\Microsoft Visual Studio 10.0
> [2] Microsoft Visual C++ 2010 Express in C:\Program Files
> (x86)\Microsoft Visual Studio 10.0
>
> and option [1] works fine for 64-bit compiling.
>
> Perhaps R2009a does not support the latest SDKs.
>
> I uploaded a mexw64 file athttp://
bit.ly/wLKtcl.