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

Adrien Vogt-Schilb vogt at centre-cired.fr
Tue Jan 11 17:31:06 CET 2011


I am experiencing the same thing: being lost in the toolbox skeleton.

I also find that typing "help api_scilab" does not help me at all right 
now. And i just understood today (thanks to allan's mail) that toolboxes 
is the modern way of doing what i do with call.

For now i am still using ilib_for_link and call, because of the very 
effective help of ilib_for_link, which does provide a complete example.

If anyone happens to have some guidelines, it would be very helpfull to 
make a wiki i think.

Le 11/01/2011 17:10, Antoine Monmayrant a écrit :
> 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
>>
>>
>>
>
>


-- 

*Adrien Vogt-Schilb*

Research Fellow

vogt at centre-cired.fr <mailto:vogt at centre-cired.fr>

Tel: (+33) 1 43 94 73 72

Fax: (+33) 1 43 94 73 70

CIRED

	

45 bis, Av de la Belle Gabrielle

F-94736 Nogent-sur-Marne

http://www.centre-cired.fr/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110111/3d617a4d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logocired.png
Type: image/png
Size: 4092 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110111/3d617a4d/attachment.png>


More information about the users mailing list