http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L
Subject:
How can I set up Microsoft Visual Studio 2008 Express Edition for use with MATLAB 7.7 (R2008b) on 64-bit Windows?
Problem Description:
I would like to set up Microsoft Visual Studio 2008 Express Edition for use with MATLAB 7.7 (R2008b) on 64-bit Windows.
Solution:
The support for Microsoft Visual Studio 2008 Express Edition to create MEX files has been added in MATLAB 7.7 (R2008b). On 64-bit Windows, Visual Studio 2008 Express Edition support requires you to install some optional components as detailed below. Note that in some cases, the configuration steps described below are known to work with MATLAB 7.8 (R2009a), MATLAB 7.9 (R2009b) and MATLAB 7.10 (R2010a) as well. When using 64-bit MATLAB on 64-bit Windows, you must use a 64-bit compiler to build MEX-files, MATLAB Compiler & Builder components, Simulink S-functions, RTW models, etc. The full list of supported products is available at: http://www.mathworks.com/support/compilers/current_release/ The default installation of Visual Studio 2008 Express is only capable of building 32-bit binaries, and will not work with MATLAB. In order to build 64-bit binaries, the “x64 Compilers and Tools” and Microsoft Windows Software Development Kit (SDK) must both be installed. The x64 Compilers and Tools are not installed by default. Without these packages, Visual Studio can build simple C/C++ applications as 32-bit binaries — “Hello World” type programs compile and execute as expected. However, Visual Studio cannot build the 64-bit binaries MATLAB requires. To install Visual Studio 2008 Express Edition with all required components: http://www.microsoft.com/downloads/details.aspx? This package can be installed using the default options. 2. Install the Microsoft Windows SDK. The Microsoft Windows SDK is available by searching Microsoft’s download site, or by going directly to: Download the Windows Server 2008 & .NET 3.5 SDK. Do not install beta or ‘Release Candidate’ (RC) versions. Also do NOT install “Microsoft Windows SDK for Windows 7 and .NET Framework 4″ (version 7.1); if you want to use a 7.x version choose the “Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1″. 2.1. While installing the SDK, you must select “x64 Compilers and Tools”. For example, in the SDK installer above: 3. To verify that you have all installed components, check that the Microsoft SDK contains the “amd64″ version of the C/C++ compiler “cl.exe”. This is usually installed into C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\cl.exe For example, to select the compiler and build the YPRIME.C example MEX-file, ans = 2.0000 8.9685 4.0000 -1.0947If you are unable to select your compiler, compile the MEX-file, or execute the MEX-file, consult the Troubleshooting section below. 5. Troubleshooting ***************************************************************************** For information on which MathWorks products support Visual Studio 2008 Express Edition in your release, see the Supported Compiler List: |
Related Solutions:
