[scilab-Users] compiling c block with LCC

Dirk Schwitzt trendic at gmx.de
Tue Nov 24 21:31:28 CET 2009


This doesnt change anything.

It doesnt work with the VC compiler as well. It says:

ilib_for_link('pendel_c.c','pendel_c.o',[],'c');
   erzeuge eine Laderdatei
   erzeuge ein Makefile
   Führe Makefile aus
   Kompilation von pendel_c
   erzeuge eine gemeisame Bibliothek (habe Sie Geduld)
   NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio 8\VC\bin\cl.EXE"' : return code '0x2'
   Stop.
 !--error 10000 
unix_s: error during "nmake /Y /nologo /f Makelib.mak all" execution
at line      34 of function unix_s called by :  
at line      67 of function ilib_compile called by :  
at line      59 of function ilib_for_link called by :  
ilib_for_link('pendel_c.c','pendel_c.o',[],'c');


Any ideas?



-------- Original-Nachricht --------
> Datum: Tue, 24 Nov 2009 20:50:27 +0100
> Von: Roberto Bucher <roberto.bucher at supsi.ch>
> An: users at lists.scilab.org
> CC: trendic at gmx.de
> Betreff: Re: [scilab-Users] compiling c block with LCC

> Try to cmodify as some parts as following
> 
> ...
> if(flag==1){
> double *y = block->outptr[0];
> y[0] = block->x[0];
> ...
> double *M = block->inptr[0];
> ...
> 
> block->xd[1]=1/m/l/l*(g*l*cos(phi)*m-c*phi-M[0]-d*omega);
> ...
> 
> Regards
> 
> Roberto Bucher
> 
> On Tuesday 24 November 2009 19:09:39 trendic at gmx.de wrote:
> > Hi,
> > 
> > Even if there is an error in the code I dont understand the
> >  Warnings/errors. This is the example Code:
> > 
> > #include <scicos/scicos_block.h>
> > #include <math.h>
> > void pendel_c(scicos_block *block, int flag) {
> > if(flag==1){
> > block->outptr[0][0]=block->x[0];
> > }
> > if(flag==0){
> > double g=9.81;
> > double m = block->rpar[0];
> > double l = block->rpar[1];
> > double c = block->rpar[2];
> > double d = block->rpar[3];
> > double phi=block->x[0]; //phi
> > double omega=block->x[1]; //omega
> > double M = block->inptr[0][0];
> > block->xd[0]=block->x[1];
> > block->xd[1]=1/m/l/l*(g*l*cos(phi)*m-c*phi-M-d*omega);
> > }
> > }
> > 
> > 
> > I have tried to insert the Code in a block and tried the command
> > 
> > ilib_for_link('pendel_c','pendel.o',[],'c');
> > 
> > best regards
> > 
> > -------- Original-Nachricht --------
> > 
> > > Datum: Tue, 24 Nov 2009 12:01:29 +0100
> > > Von: "Allan CORNET" <allan.cornet at scilab.org>
> > > An: users at lists.scilab.org
> > > Betreff: RE: [scilab-Users] compiling c block with LCC
> > >
> > > Hi,
> > >
> > > Can you attach your diagram (example) ?
> > >
> > > Thanks you
> > >
> > > --
> > > -------------------------
> > > Allan CORNET
> > > -------------------------
> > > The Scilab Consortium
> > > Digiteo
> > > Domaine de Voluceau
> > > Rocquencourt - B.P. 105
> > > 78153 Le Chesnay Cedex
> > > France
> > >
> > > -----Message d'origine-----
> > > De : trendic at gmx.de [mailto:trendic at gmx.de]
> > > Envoyé : mardi 24 novembre 2009 11:48
> > > À : users at lists.scilab.org
> > > Objet : [scilab-Users] compiling c block with LCC
> > >
> > > Hello,
> > >
> > > Does anyone know how to compile and link a c block for scicos?
> > >
> > > I have tried with the Blocks in the Palette "user defined functions"
> but
> > > I get errors with that. At first I recieve the warning:
> > >
> > > C:/SCILAB~1/modules/dynamic_link/src/scripts/TEMPLATE_MAKEFILE.LCCnot
> > > found.
> > >
> > > which is surprising since there is a file with that name at exactly
> that
> > > position. I further get the Message
> > >
> > > Can't open Makelib.lcc
> > >
> > > After that:
> > >
> > > unix_s: error during "make -f Makelib.lcc all" execution ...
> > >
> > > Is the command unix_s correct although I am working on windows?
> > >
> > > I have googled around and found someone who says that you can compile
> > > Functions similar to S-Functions in Matlab by the ilib_for_link
> command.
> > >
> > > I have tried that with an example c-File which delivers exactly the
> same
> > > Warnings/Errors as mentioned above.
> > >
> > >
> > > Another question I have is: when I edit system functions as
> > > "ilib_for_link.sci" e.g. how is the corresponding ilib_for_link.bin
> file
> > > created?
> > >
> > > Thanks for any advise in advance
> > >
> > > Olaf
> > 
> 
> -- 
> University of Applied Sciences of Southern Switzerland
> Dept. Innovative Technologies
> CH-6928 Lugano-Manno
> http://web.dti.supsi.ch/~bucher

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser



More information about the users mailing list