-1

我正在尝试构建一个 C# 应用程序,该应用程序使用使用 Matlab Builder NE构建的 Matlab 库。我已经引用了 MWArray.dll 和 Matlab 生成的 dll,但我仍然收到以下错误消息:

找不到类型或命名空间名称“MWMCR”(您是否缺少 using 指令或程序集引用?)

更多信息:

  • 我将 VS2010 与 .NET 4 框架一起使用。
  • Matlab dll 不是由我构建的,我不确定它需要哪个 Matlab 版本或哪个 .Net 框架(这可能是问题吗?)
4

1 回答 1

0

You said you referenced the dlls, but didn't say precisely where you referenced them. I had a similar issue the first time I attempted to get a MATLAB dll from Builder NE working within a C# project. Ultimately, it turned out that simply referencing the MATLAB dlls from within the .NET assembly that made use of them was insufficient. It wasn't until I referenced the MATLAB dlls at the top level of the project that they actually loaded at runtime and things started working as expected. Give it a try. Add a reference to the dlls at the top level of the project.

于 2011-06-24T21:47:23.267 回答