【问题标题】:Loading an Visual Studio DLL into Matlab将 Visual Studio DLL 加载到 Matlab 中
【发布时间】:2015-01-14 16:30:34
【问题描述】:

我有一个从 Visual Studio 2010 编译的 64 位 DLL,编码如下:visual studio Dll and Matlab

当我在 Matlab(64 位)中调用 loadlibrary 时,我收到以下错误消息:

Error using loadlibrary (line 254)
A 'Selected' compiler was not found.  You may need to run mex
-setup.

有什么建议吗?

【问题讨论】:

    标签: visual-studio-2010 matlab dll


    【解决方案1】:

    如错误消息所述,您必须指定用于生成库的编译器。使用mex -setup 执行此操作。

    我认为 Matlab 需要知道使用哪个编译器来生成库,因为 ABI 依赖于 C++ 的编译器......虽然我在另一个答案中看到他们使用 extern "C" 导出函数,这应该使它们符合 C ABI,这在 x86_64 Windows 上或多或少是标准的,所以我对此不太确定......

    【讨论】:

      猜你喜欢
      • 2012-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-08
      • 1970-01-01
      • 2013-06-10
      • 1970-01-01
      相关资源
      最近更新 更多