Error Mex -setup and Matlab 2011a

I am trying to compile some c++ code into a MEX in MATLAB 2011a under Windows 8 64 bit. I get the following error:

Error: Could not find the compiler “cl” on the DOS path.
Use mex -setup to configure your environment properly.

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.

I search solution and read many way and than i found it. This solution done very nice to solve this. I found this from https://bhaskarstechmusings.blogspot.co.id/2012/09/mex-and-matlab-2010.html and i said thanks alot. this problem make me very frustation. This solution is simple enough, that is:

Update your windows SDK to SDK 7.1 or latest!!!

Then i try to run compiling my mex file using matlab and yeacchhh. done…..

>> install_lightspeed
Compiling lightspeed 2.7 mex files…
Using the lapack library at C:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft\libmwlapack.lib
mex -largeArrayDims -DBLAS64 solve_triu.c “C:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft\libmwlapack.lib” “C:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft\libmwblas.lib”
install_random.bat “C:\Program Files (x86)\Microsoft Visual Studio 10.0\” x86_amd64
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows 7 x64 Debug

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

random.c
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.

Creating library random.lib and object random.exp
lightspeed’s matfile utility is not supported for this version of Matlab
Done.
Type “test_lightspeed” to verify the installation.

This entry was posted in Tips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

* Kode Akses Komentar:

* Tuliskan kode akses komentar diatas: