No BSD License  

4.30769

4.3 | 13 ratings Rate this file 38 Downloads (last 30 days) File Size: 85.4 KB File ID: #13321

howto: mex + MS Visual C/C++ Express Edition 2005

by

 

09 Dec 2006 (Updated )

Describes steps to set up the free Visual C/C++ Express Edition 2005 compiler as mex backend

| Watch this File

File Information
Description

Steps for how to install the 2005 Express Edition Visual C/C++ as the backend mex compiler. This document is for you if:

You want to compile C mex files using the free Microsoft Visual C/C++ compiler that comes with Visual Studio 2005 Express Edition.

You want to be able to compile your mex file using the Matlab command line tool mex, rather than creating projects and compiling within the Visual Studio IDE.

You want to do this with zero hacking on the mex installation or on any mexopts.bat files.

Acknowledgements

This file inspired Image Aquisition and Arfima(P,D,Q) Estimator.

MATLAB release MATLAB 7.3 (R2006b)
Other requirements This file has been updated to encompass Matlab 2006a/b and R2007a.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
21 Sep 2012 GIGA

the file does not exit

04 Oct 2010 C. Peng

2007b with VC 2008 express, successful, thank you!

05 May 2009 Sunish George

I successfully configured Microsoft Visual C++ 2008 Express Edition for version 2006a using the instructions given. Thank you so much for sharing this info.

28 Aug 2008 Richard Register

Confirmed that Visual C++ 2008 Express works with Matlab 2008a (v7.6.0) by following these instructions.
The final step, running mex -setup, had no trouble finding the Visual C++ 2008 express compiler and mex is working for me now. Thank you!

16 Apr 2008 Alf-Peter Elg  
27 Mar 2008 Jeroen Sabbe

Thank you so much for this extremely clear document! I have Matlab R2007a and wanted to use CPLEXINT (http://control.ee.ethz.ch/~hybrid/cplexint.php) to link with CPLEX, but I couldn't get the files compiled with lcc. Thanks to your document, I could compile them with MS C++ Compiler and things worked perfectly. Thank you so much!

02 Feb 2008 Fawad Muzaffar

I was able to configure Matlab R 2007b with Visual C++ 2008 using the step by step procedure. Thank you for uploading this file

20 Dec 2007 Sivarama Venkatesan

Very helpful. Thank you for the painstaking effort to document all the steps so clearly. I used your procedure with Matlab R2007b and Microsoft Visual C++ 2008 Express Edition, and it worked perfectly.

05 Jul 2007 Will Fox

As of the 2007a release, Matlab/mex now recognizes VC 2005 Express Edition as a supported compiler. Unfortunately, in the process they made changes which break the steps set out in the how-to, which was devised based on 2006a/b. (I believe the last post was referring to this fact.)

You still need to install VC Express and the Platform SDK (though the exact location of the latter may no longer be important).
CRITICAL: 2007a requires the Windows environment variable "MSSdk" which must contain the path to the SDK. A handy test to see which windows environment variables Matlab sees is to do
>> !set
at the Matlab prompt.

For reference, you can see http://www.mathworks.com/support/tech-notes/1600/1601.html, in particular footnote 1.

I will update the how-to once I can get a copy of 2007a and test everything myself. Please email me with any questions in the meantime.

31 May 2007 Anthony Faucogney

This seems to be great, but it doesn't work for me. I use Matlab 2007a and unfortunatly nothing is is working. When I type mex-setup and chose the [2]visual C++ 2005 Espress, and I still get error about unknow MSSDK....

16 May 2007 Ewan Fitzsimons

Or you could just edit the 'mssdk' environment variable to wherever you install the Platform SDK, and Matlab will look for it there

12 Apr 2007 Fang Yu

This solves my mex compiling problem.

23 Mar 2007 Jim Lasswell

Thank you for the advice.

07 Feb 2007 good advice

wish i had read this before using the mex command... i think the moral is to right your own options file for mex so you can understand what directories to include, etc.

18 Jan 2007 one satisified reader

Using this free compiler solved all the problems I was having with that native matlab C compiler Lcc.

Updates
05 Jul 2007

Updating the requirements to say that the how-to only works for 2006a/b, not 2007a.

Contact us