[scilab-Users] C->Scilab: Now I'm lost and need some directions

Antoine Monmayrant antoine.monmayrant at laas.fr
Tue Jan 11 17:10:19 CET 2011


Le 11/01/2011 16:55, Allan CORNET a écrit :
> Hi,
>
> See help about api_scilab to write a primitive
>
> You can also see example in toolbox_skeleton  SCI/contrib/toolbox_skeleton
Well, I didn't mention it, but I downloaded this module and I opened all 
the files I found and I was lost.
Basically I don't know where to start and which file does what and what 
I should modify to adapt to my c code.
> Allan
>
>
>
> -----Message d'origine-----
> De : Antoine Monmayrant [mailto:antoine.monmayrant at laas.fr]
> Envoyé : mardi 11 janvier 2011 16:47
> À : users at lists.scilab.org
> Objet : [scilab-Users] C->Scilab: Now I'm lost and need some directions
>
> Hi all,
>
> I am fighting to call some C code from within Scilab, or more precisely to
> add a primitive to Scilab using some C code I wrote.
> I have a working C code and I managed to link it to Scilab by using
> "ilib_for_link".
> It works, no problem.
> Now I would like to bullet-proof it, that is to get it to work like a real
> scilab primitive.
> For example, at the moment, if I try to open a file that do not exist (from
> within my C code), I just kill my Scilab session.
> This is due to the way the error is treated in my C code.
> I would prefer to get a normal Scilab error: "!--error 241, File does not
> exist".
> In the end, I would like to handle all the usual scilab error (wrong number
> of arguments, wrong type, ...) gracefully.
> What should I do?
> I found bits and pieces here and there about how to link, what the interface
> should be like, how to use call, ... but I can't put the pieces together to
> get a big picture of what I should do.
> I found "intersci" but it is obsolete. I found some articles but they are
> outdated ( http://www.saphir-control.fr/articles/lm15/article.html ).
> Does anyone know a proper tutorial or *complete* example ( c_source,
> interface_source, build and example of use) on the subject?
>
> Thank you in advance,
>
> Antoine
>
>
>


-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  31077 TOULOUSE
  Cedex 4 FRANCE

  Tel:+33 5 61 33 64 59

  email : antoine.monmayrant at laas.fr
  permanent email : antoine.monmayrant at polytechnique.org

+++++++++++++++++++++++++++++++++++++++++++++++++++++++





More information about the users mailing list