本帖最后由 Ericwjc 于 2014-6-17 19:35 编辑
运行 mex -setup时,出现:
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer.
For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html
Error using mex (line 206)
Unable to complete successfully.
如果 Would you like mex to locate installed compilers [y]/n?n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[4] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[5] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[8] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[10] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[11] Microsoft Software Development Kit (SDK) 7.1
[12] Microsoft Visual C++ 2005 SP1
[13] Microsoft Visual C++ 2008 SP1
[14] Microsoft Visual C++ 2010
[0] None
Compiler:
compiler 选 11或者13或者14都不行。
Warning: The default location for Microsoft Visual C++ 2010 compiler is:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0"
but either that directory does not exist or the configuration
is invalid.
Use C:\Program Files (x86)\Microsoft Visual Studio 10.0 anyway [y]/n? y
Please verify your choices:
Compiler: Microsoft Visual C++ 2010
Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0
Are these correct [y]/n? y
*****************************************************************************
Error: Microsoft Visual C++ 2010 requires the Microsoft Windows Software
Development Kit (SDK), but the SDK cannot be found. Examine your
Microsoft Visual C++ 2010 installation.
*****************************************************************************
Error using mex (line 206)
Unable to complete successfully.
请教高手,谢谢!
mex问题解决了!!!!!
之前按照网上说的安装各种 "Win SDK for Windows 7 and .NET 4",由于下载了 “GRMSDK_EN_DVD.iso”这个文件,安装的时候总是会显示 “Setup could not find the file WinSDK_amd64\WinSDK_amd64.msi at any of the specified source locations”。
然后还是在网上各种搜索,后来在看到了下面的说明:
================================================
File Name: GRMSDK_EN_DVD.iso
Chip: X86
CRC#: 0xCA4FE79D
SHA1: 0x8695F5E6810D84153181695DA78850988A923F4E
================================================
File Name: GRMSDKX_EN_DVD.iso
Chip: AMD64
CRC#: 0xB417A4F7
SHA1: 0x3393C98B8468CB3505557854922707510F8B65E1
================================================
File Name: GRMSDKIAI_EN_DVD.iso
Chip: Itanium
CRC#: 0x5E0E4BEA
SHA1: 0xAE454215585A044EBE593E9F71FF1A4BC03D56A8
================================================
看到了上面的”Chip: AMD64“,于是想这个会不会和“Setup could not find the file WinSDK_amd64\WinSDK_amd64.msi at any of the specified source locations”中的“amd64”有关,于是就下载了“GRMSDKX_EN_DVD.iso”,接着安装顺。
>> mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[4] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[5] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[8] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[10] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[11] Microsoft Software Development Kit (SDK) 7.1
[12] Microsoft Visual C++ 2005 SP1
[13] Microsoft Visual C++ 2008 SP1
[14] Microsoft Visual C++ 2010
[0] None
Compiler: 13
Warning: The default location for Microsoft Visual C++ 2008 SP1 compiler is:
"C:\Program Files (x86)\Microsoft Visual Studio 9.0"
but either that directory does not exist or the configuration
is invalid.
Use C:\Program Files (x86)\Microsoft Visual Studio 9.0 anyway [y]/n? y
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: MEX-files generated using Microsoft Visual C++ 2008 require
that Microsoft Visual Studio 2008 run-time libraries be
available on the computer they are run on.
If you plan to redistribute your MEX-files to other MATLAB
users, be sure that they have the run-time libraries.
***************************************************************************
Trying to update options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2012a\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2012a\bin\win64\mexopts\msvc90opts.bat
Done . . .
**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
Building with the -largeArrayDims option enables the new API.
**************************************************************************
但还是 compile failed !!!!???????????????????????????
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Compile of 'cemdc.c' failed.
请教高手上述问题,非常感谢!