【发布时间】:2014-10-23 13:35:22
【问题描述】:
我编写了一些函数并通过 C++ 代码创建了 dll,并使用了一些 C++ 头文件。但是我发现 loadlibrary 只支持 C 头文件,我得到了这个错误:
Error using loadlibrary (line 419)
Failed to preprocess the input file.
Output from preprocessor is:LargeBaseConvertorClass.h
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\eh.h(26) : fatal error C1189: #error : "eh.h is only for
C++!"
我不想更改我的代码,也不想使用 mex 函数。
如何在 matlab 中使用我的 C++ dll? (我需要很多)
谢谢。
亚阿里。
【问题讨论】:
-
请显示你使用的matlab命令。
-
loadlibrary('e:/LargeBaseConvertorDll.lib', 'e:/LargeBaseConvertorClass.h')
-
在哪个操作系统上?使用哪些命令?请编辑您的问题以改进它!
标签: c++ matlab header-files loadlibrary