Error using calllib Too many inputs passed to SimpleFunctionThunk.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sahil gandhi
am 18 Aug. 2015
Beantwortet: sahil gandhi
am 30 Jan. 2018
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 Kommentar
Akzeptierte Antwort
Weitere Antworten (1)
Philip Borghesani
am 18 Aug. 2015
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 Kommentare
Siehe auch
Kategorien
Mehr zu C Shared Library Integration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!