[Scilab-users] Integrating SciLab and EPANET (.dll written in C/C++)

Chuox chuox.bece at gmail.com
Fri Jul 5 20:45:17 CEST 2013


Hi im trying to integrate EPANET and SciLab, i all ready do it in MATLAB, (i
actually din't do it  Demetrios Eliades
<http://www.mathworks.com/matlabcentral/fileexchange/authors/53840>   i'm
going to show how i succesfull did it in MATLAB, and then how i'm trying to
do it in SciLab.

In MATLAB



>> loadlibrary('epanet2', 'epanet2.h')

>> [errorcode] = calllib('epanet2', 'ENopen', 'Net1.inp', 'temp1.$$$',
>> 'temp2.$$$')

errorcode =

     0

>> index=1;
diam=0;
[error,diam] =calllib('epanet2', 'ENgetlinkvalue', index, 0, diam)

error =

     0


diam =

    18

End Working in MATLAB


In SciLab


-->link("C:\Users\Alfredo\Google
Drive\Tesis\SciLab\epanet2.dll","ENopen","c")
Shared archive loaded.
Link done.
 ans  =
 
    0. 

-->c_link("ENopen")
 ans  =
 
  T  

-->call("ENopen","C:\Users\Alfredo\Google
Drive\Tesis\SciLab\Net1.inp","temp1.$$$","temp2.$$$")
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "call" function.
Save your data and restart Scilab.
 ans  =
 
 temp2.$$$   
 
Warning: stack problem..., cleared.

En working in SciLab


I think in not using very well the call function, any help will be
apreciated, thanks.



--
View this message in context: http://mailinglists.scilab.org/Integrating-SciLab-and-EPANET-dll-written-in-C-C-tp4026977.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list