1

对于在 Matlab 中构建自定义 mex 文件,我试图通过以下方式从 Matlab 命令 shell 调用 Visual Studio 2010 的 link.exe:

>> !link

完全没有效果。使用 Matlab 的“dos”的替代调用返回错误值:

>> dos('link')
   ans = -1.0737e9

但是,直接从外部 Windows shell 调用链接可执行文件效果很好。

如何从 Matlab中调用link.exe ?任何帮助将不胜感激!

  • 操作系统:Win7 32位
  • Matlab:R2012a
  • Visual Studio C++ 2010 速成版

谢谢,彼得

4

1 回答 1

0

检查您是否在 link.exe 的源代码中返回正确的值。

dos('testapp.exe') 和 system('testapp.exe') 都应该可以工作...如果您详细说明问题(link.exe 的输入和输出),有人可能会为您提供帮助。

于 2013-02-07T10:21:07.720 回答