Installed Visual C++ 2008 Express and Windows SDK for Windows Server 2008 and .NET Framework 3.5 to compile MATLAB R2010a project, but MATLAB still can't find compiler
3 views (last 30 days)
Show older comments
Hello,
Specs:
MATLAB R2010a
Windows 10 Enterprise LTSC (Version 10.0.17763 Build 17763) 64-bit machine
My office just made the move from Windows 7 to 10 and I'm trying to reinstall the compilers. I installed Visual C++ 2008 Express and Windows SDK for Windows Server 2008 and .NET Framework 3.5, however, MATLAB is still not correctly detecting a x64 compiler. I made sure during installation to check the x64 options for the SDK install.
What can I do?
Thanks!
Shen
3 Comments
Answers (1)
Kevin Chng
on 4 Jul 2019
I have successfully did it in my pc to compile exe. file by using R2010a in window 10.
Compiler I used is
Microsoft Visual C++ 2008 SP1 in C:\Program Files (x86)\Microsoft Visual Studio 9.0
I follow the steps below to install my x64 bits compiler and tools, I feel it is very important since I realize the x64 Compiler and Tools are not installed by default :
- You can go to Control Panel -> Uninstall programs
2. Select Visual Studio and click Uninstall/Change
3. Click Next
4. Choose Add or Remove features
5. Expand MSVC 2008-> Language Tools -> Visual C++
6. Select x64 Compilers and Tools
After I complete this, I run the following command to select my compiler :
>> mbuild -setup -v
This is mbuild Copyright 1984-2006 The MathWorks, Inc.
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild 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
[2] Microsoft Visual C++ 2008 SP1 in c:\Program Files (x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 SP1
Location: c:\Program Files (x86)\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
****************************************************************************
Warning: Applications/components generated using Microsoft Visual Studio
2008 require that the Microsoft Visual Studio 2008 run-time
libraries be available on the computer used for deployment.
To redistribute your applications/components, be sure that the
deployment machine has these run-time libraries.
****************************************************************************
Trying to update options file: C:\Users\KevinChng\AppData\Roaming\MathWorks\MATLAB\R2010a\compopts.bat
From template: C:\PROGRA~1\MATLAB\R2010a\bin\win64\mbuildopts\msvc90compp.bat
Done . . .
Then I try generate a simple function as following :
function y = hello(x)
y=x
end
Eventually, I compile them by following command in MATLAB R2010a :
mcc -mv hello.m
1 Comment
Kevin Chng
on 4 Jul 2019
I forgot why i use Microsoft Visual C++ 2008 SP1 instead of Microsoft Visual C++ 2008 Express. You can try whether it is working for Microsoft Visual C++ 2008 Express.
See Also
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!