Yes, using third-party DLL with scilab does seem to be hard. Two crucial things are not supported:
- All inputs to the function are passed by *reference*, not value, but often times DLL are build with inputs being passed by value - Functions can not return a value. IMHO these are very serious problems with the DLL integration. I couldn't use my DLL in scilab because of these issues. And the documentation on this topic is quite weak. Especially the always passing by reference part. That took me a few hours of debugging to realize that. Ian On Fri, Feb 21, 2014 at 7:31 PM, Chuox <[email protected]> wrote: > Using a third-party DLL in SciLab might be tricky. > I had a problem linking EPANET toolkit library, what i did was create a dll > to call the epanet2.dll (the library form EPANET) and return the values in > SciLab. Maybe is not the best solution and there is a better way, but i > didn't find it. > This is and example of how i did it: > > /////The C code///// > #include <string.h> > #include "epanet2.h" > int SetLinkValue(int *index, int *param, float *Val, int *errcode ) > { > *errcode=ENsetlinkvalue(*index, *param, *Val); > return (*errcode); > } > > /////SciLab Code///// > //Link the dll used to cal the external dll > unSetLink=link(Ubicacion+"enlace.dll","SetLinkValue","c"); > > //This return and error > > [err]=call("SetLinkValue",TubIndex,1,"i",0,2,"i",diametro,3,"r","out",[1,1],4,"i"); > > > > -- > View this message in context: > http://mailinglists.scilab.org/Scilab-users-Linking-DLL-from-MS-Visual-C-to-SciLab-tp4028800p4028813.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive > at Nabble.com. > _______________________________________________ > users mailing list > [email protected] > http://lists.scilab.org/mailman/listinfo/users >
_______________________________________________ users mailing list [email protected] http://lists.scilab.org/mailman/listinfo/users
