Error using calllib Too many inputs passed to SimpleFunctionThunk.
5 次查看(过去 30 天)
显示 更早的评论
I am using the calllib function to call on my 64-bit C++ lib. I am using Matlab R2015a. The prototype used to load the library using the loadlibrary function is
ival={cell(1,1)};
fcns=struct('name',ival,'calltype',ival,'LHS',ival,'RHS',ival,'alias',ival);
structs=[];
enuminfo=[];
fcns.name{1}='MyFunc'; fcns.calltype{1}='cdecl'; fcns.LHS{1}='doublePtr'; fcns.RHS{1}={ ...
'stringPtr' , 'int32Ptr' , 'stringPtr' , ...
'int32Ptr' , 'stringPtr' , 'int32Ptr' , ...
'int32Ptr' , 'doublePtr' , 'int32Ptr'};
methodinfo=fcns;
After the loadlibrary, I have verified that its loaded using the libfunctionsview function. After the call is made, i get the following error
Error using calllib
Too many inputs passed to SimpleFunctionThunk.
Please let me know if there is any fix to this issue.
-Sahil
1 个评论
采纳的回答
更多回答(1 个)
Philip Borghesani
2015-8-18
Calltype of 'cdecl' is not supported on 64 bit systems however it does work for simple functions with a limited number of integer and pointer arguments. You will need to use a thunkfile to call this function. Try loading your file with a new loadlibrary command starting from scratch and examine the generated prototype information and thunk file.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 C Shared Library Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!