Error Packaging Excel Function

5 ビュー (過去 30 日間)
Peter
Peter 2015 年 6 月 23 日
コメント済み: Peter 2015 年 6 月 25 日
I am trying to follow the example of packaging a simple function to use within an excel spreadsheet.
function y = mymagic(x)
y = magic(x);
I go into the "MATLAB Compiler" select my file and click Package. I get the error seen below.
The log file is attached. I believe the error has something to do with line 198:
Creating library C:\Users\Magnet Mapper\Documents\MATLAB\mymagic\for_testing\mymagic_1_0.lib and object C:\Users\Magnet Mapper\Documents\MATLAB\mymagic\for_testing\mymagic_1_0.exp
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Can anyone help me resolve this?
Thank you!

採用された回答

Gitesh Nandre
Gitesh Nandre 2015 年 6 月 24 日
There is a Microsoft issue where the installation of Visual Studio 2012 causes problems with the Visual Studio 2010 installation, which results in the same error above. More details are at:
To fix it, either upgrade Visual Studio 2010 to SP1, or disable incremental linking in Visual Studio.
This issue also occurs when without Visual studio installations when you upgrade to .NET framework 4.5 and use Microsoft Windows SDK 7.1 as compiler. The workaround is to downgrade to .NET framework 4.0.
  2 件のコメント
Peter
Peter 2015 年 6 月 25 日
I have these installed:
  • Microsoft .Net Framework 4 Multi-Targeting Pack
  • Microsoft .Net Framework 4.5.2
  • Microsoft Visual Studio 2010 Tools for Office Runtime (x64)
  • Microsoft Windows SDK for Windows 7 (7.1)
How do I know which one(s) are the problem?
Peter
Peter 2015 年 6 月 25 日
I ended up uninstalling Microsoft .Net Framework 4 Multi-Targeting Pack and Microsoft .Net Framework 4.5.2
I then re-installed Microsoft Framework 4, and successfully repackaged my function for use in excel.
Thank you for your help!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler SDK についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by