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

2 ビュー (過去 30 日間)
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 件のコメント
Shen Liu
Shen Liu 2019 年 7 月 4 日
here it is:
>> mbuild -setup
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
[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 binaries,
Microsoft Visual C++ 2008 Express Edition requires that these two
packages be properly installed.
*****************************************************************************
Trying to update options file: C:\Users\sliu\AppData\Roaming\MathWorks\MATLAB\R2010a\compopts.bat
From template: C:\PROGRA~1\MATLAB\R2010a\bin\win64\mbuildopts\msvc90freecompp.bat
Done . . .
Shen Liu
Shen Liu 2019 年 7 月 4 日
From poking around on other forums, it seems significant that there is no "amd64" folder with "cl.exe" in the "Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/" folder. I'm definitely sure I checked x64 compilers and tools when I did the install.
I would definitely try another install, but that might have to wait a couple days. The IT people are gone and I don't have admin privileges...

サインインしてコメントする。

回答 (1 件)

Kevin Chng
Kevin Chng 2019 年 7 月 4 日
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 :
  1. 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 件のコメント
Kevin Chng
Kevin Chng 2019 年 7 月 4 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by