【问题标题】:How do I get Matlab R2007b to work with Visual Studio c++ 6.0?如何让 Matlab R2007b 与 Visual Studio c++ 6.0 一起工作?
【发布时间】:2011-12-01 02:47:11
【问题描述】:

如何让 Matlab R2007b 在(Win 7.0 64 位操作系统)中与 Visual Studio c++ 6.0 一起工作?

我收到以下错误:

    >> loadlibrary dog.dll dog.h

Warning: Shared libraries are not supported on this platform.  
Functions that do not have a mexFunction signature may have unpredictable results.

    > In loadlibrary at 54

    ??? Error using ==> loadlibrary at 209
    LCC was not found at C:\Program Files\MATLAB\R2007b\sys\lcc\bin\lcc.exe.

【问题讨论】:

  • VS C++ 6.0 with matlab R2007b?
  • 你读过MEX-files Guide吗?当您按照"Hello, World!" MEX-file 的说明进行操作时会发生什么? dog.dlldog.h 文件是什么?为什么要使用 13 年前的 C++ 编译器? Windows 7 SDK 包含最新版本编译器(不是 IDE)的免费版本。
  • DLL 文件确实允许您在运行时导入代码。但是,不能保证您可以“轻松”地在任何应用程序中安全地注入任何 DLL。尊重是有限制的。您必须确保双方的 C++ 运行时是兼容的,等等。并且 MATLAB 期望您的 DLL 提供一个名为 mexFunction() 的函数,该函数应该具有特定的签名。这称为合约。向我们展示您真正想要做的事情将有助于我们确定您是否遵守 MATLAB 对您的 DLL 的期望。
  • 此外,技术在不断发展,不能保证“多年前”有效的技术今天仍然有效。
  • @AndréCaron:MEX 函数和loadlibrary-DLL 不是一回事。

标签: matlab dll shared-libraries loadlibrary visual-studio-6


【解决方案1】:

首先运行mex -setup,然后选择Visual Studio。

如果您阅读 MATLAB 帮助,一切都会变得一目了然。见http://www.mathworks.co.uk/help/techdoc/matlab_external/f43202.htmlhttp://www.mathworks.co.uk/support/compilers/release2007b/

【讨论】:

    猜你喜欢
    • 2013-08-07
    • 1970-01-01
    • 2013-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-14
    • 1970-01-01
    相关资源
    最近更新 更多