我正在使用其他人使用 c++ 和 matlab 开发的程序。我有两者的源代码,但我不知道发生了什么......
Matlab 使用类似这样的方法调用从 c++ 生成的 dll:
myCustomCppFunction('param1', 'param2)
我期待在 dll 导出中看到myCustomCppFunction,但我找不到它。
当我运行dumpbin命令时,我收到如下信息:
dumpbin /exports c:/myCustomCpp.dll
ordinal hint RVA name
1 0 00001010 myCustomCppFunctionWithADifferentName
所以,
myCustomCppFunctionWithADifferentName != myCustomCppFunction
DLL 导出的函数名称与我的 matlab 调用的函数名称不同。而且我不是在谈论混乱的名字,两个名字都是 100% 不同的,比如“苹果”和“香蕉”。:-)
不知何故,一切正常!但是如何?!?
在 Matlab 中,我还运行了哪个命令向我确认调用的函数来自我正在调查的 DLL....
>> which myCustomCppFunctionWithADifferentName
>> c:/myCustomCpp.dll
任何线索?