Matlab和DLL-“找不到方法”

时间:2013-10-09 20:53:37

标签: matlab dll

我将一个dll加载到matlab中:

[met,b]=loadlibrary([geodesic_library '.dll'], hfile);

然后我从dll调用一个函数,如下所示:

[id, tmp1, tmp2, num_edges, edges] = calllib(geodesic_library, 'new_mesh', length(p)/3, p, length(t)/3, t, 1, tmp);

这会产生错误

Method was not found. 

然而,看看lib中的方法,我清楚地看到该方法存在:

met = 
  Columns 1 through 4
    'new_mesh'    'new_algorithm'    'delete_algorithm'    'delete_mesh'
  Columns 5 through 8
    'propagate'    'trace_back'    'distance_and_source'    [1x36 char]

这里也是b的内容:

geodesic_matlab_api.h
geodesic_release_thunk_pcwin64.c
   Creating library geodesic_release_thunk_pcwin64.lib and object geodesic_release_thunk_pcwin64.exp

然而,当我致电M = libfunctions([geodesic_library '.dll']时,我认为M为空。

我使用原作者的示例代码应该可以工作,唯一的事情是我将c ++代码重新编译成64位DLL

0 个答案:

没有答案