与mcc错误相关的问题& R2013b&的mbuild -setup设置deploytool for matlab

时间:2015-07-24 05:01:14

标签: matlab visual-studio-2013 matlab-deployment matlab-compiler

我尝试在matlab中使用“deploytool”在matlab中为vba制作dll。 我的环境是Matlab R2013b和VS2013。

我使用bellow命令设置编译器

mbuild -setup

我将Visual Studio 2013作为编译器目录。 但是,下面的消息使deploytool失败了。

ant:
<ant>
  <mkdir dir="C:\Program Files\MATLAB\R2013b\work\mymagic\for_redistribution" />
  <mkdir dir="C:\Program Files\MATLAB\R2013b\work\mymagic\for_testing" />

mcc -W 'excel:mymagic,Class1,1.0' -T link:lib -b -d 'C:\Program       
Files\MATLAB\R2013b\work\mymagic\for_testing' -v 'C:\Program    
Files\MATLAB\R2013b\work\mymagic.m' 'class{Class1:C:\Program
Files\MATLAB\R2013b\work\mymagic.m}' 

Test checkout of feature 'Compiler' failed.

mcc failed.

我还检查了其他类似讨论中的lincese问题。 使用!mcc和license('checkout','Compiler')

!mcc返回错误

Error: Could not check out a Compiler license: 
Cannot find license file. 
 The license files (or license server system network addresses) attempted are  
listed below.  Use LM_LICENSE_FILE to use a different license file, 
 or contact your software provider for a license file. 
Feature:       Compiler 
Filename:      C:\Program Files\MATLAB\R2013b\licenses 
License path:      C:\Users\****1505\AppData\Roaming\MathWorks\MATLAB\R2013b_licenses;C:\Program Files\MATLAB\R2013b\licenses\license.dat;C:\Program Files\MATLAB\R2013b\licenses; 
FLEXnet Licensing error:-1,359.  System Error: 2 "No such file or directory" 
For further information, refer to the FLEXnet Licensing documentation, 
available at "www.flexerasoftware.com".. 

但是许可证('checkout','Compiler')给了我

ans = 1

我想出了matlab R2013b支持的一件事,直到Visual Studio 2012。 从下面的网址。 http://kr.mathworks.com/support/compilers/R2013b/index.html?sec=win32

我应该在Matlab 2013中安装2012 VS以使用mcc吗?

还是有其他方法可以解决这个问题 ?

类似的问题也没有得到正确答案。

Deploytool for MATLAB R2013b doesn't work, what has changed?

我将尝试以下方法

http://de.mathworks.com/matlabcentral/answers/121413-error-using-mcc-test-checkout-of-feature-compiler-failed

可能缺少编译器许可证。

matlab中的

“mcc”命令不起作用。

所以我会按照下面的说法

www.youtube.com/watch?v=PsKQ7loWZgU

仍然不起作用

首先,matlab中的命令“mcc”不起作用 所以,我再次尝试“mbuild -setup”,但它仍然提供相同的错误消息。

问题在于,正如我在问题中已经提到的,Matlab 2013b与2013年的visual studio无法比较。

所以我在下面的网站

下载了SDK7和.net framework 4

https://msdn.microsoft.com/ko-kr/vstudio/aa496123

https://www.microsoft.com/en-us/download/confirmation.aspx?id=8442

但是在“mbuild -setup”中选择这些选项无法解决

我也尝试下载另一个包

https://www.microsoft.com/ko-kr/download/details.aspx?id=40784

仍然全部失败

1 个答案:

答案 0 :(得分:0)

这不是一个确切的答案,只是对此问题的有用评论。

我们可以做3件事来检查我们的matlab编译器许可证

license('checkout','Compiler')
!mcc
mcc

我认为如果我们可以通过那些检查而不是使用deploytool而没有任何问题。

就我而言,在激活许可证后,它会给我一个错误,例如,

Error: Could not check out a Compiler license: 
SIGN= keyword required but missing from the license certificate. 
 This is probably because the license is older than the application 
 You need to obtain a SIGN= version of this license from your vendor. 
Feature:       Compiler 
Missing:       SIGN1= 
License path:      C:\Users\****1505\AppData\Roaming\MathWorks\MATLAB\R2013b_licenses;C:\Program Files\MATLAB\R2013b\licenses\license.dat;C:\Program Files\MATLAB\R2013b\licenses\license_****1505-PC_874166_R2013b.lic; 
FLEXnet Licensing error:-114,582 
For further information, refer to the FLEXnet Licensing documentation, 
available at "www.flexerasoftware.com"..

因此,我可能需要更新许可证才能解决此问题。

我只是将Matlab 2013改为2014版。这一切都很好

另外,我认为错误的原因是许可证问题。

安装matlab 2014后,我做了以下3件事来为vba制作dll

  1. 安装MATLAB MCR 命令
  2.   
        

    mcrinstaller

      

    在matlab中

    安装生成的文件。就我而言,它位于

    C:\ Program Files \ MATLAB \ R2014a \ toolbox \ compiler \ deploy \ win32 \ MCRInstaller.exe

    1. 允许来自Excel安全中心的VBA中的宏

    2. 使用Matlab的deploytool创建VBA ADD IN

相关问题