[Scilab-Dev] Inclusion of scicos_block4.h in external toolboxes source files

ycollet at freesurf.fr ycollet at freesurf.fr
Mon Apr 6 14:06:57 CEST 2009


You should fill a bug report for both problems so as to leave a trail.
See at http:/bugzilla.scilab.org

YC

On Mon, 06 Apr 2009 09:01:42 +0200, Matteo Morelli <mmorelli at users.sf.net>
wrote:
> Dear all,
> 
>   The following is the description of a second little issue I dealt with
> when running the external contribs installation procedure in Scilab-5.x
> (see 
>
http://lists.scilab.org/cgi-bin/ezmlm-browse?list=dev&cmd=threadindex&month=200904&threadid=gnflmlndbinnkpmaclij
> if you're interested in the first issue). It occurs both under Windows
> and under GNU/Linux.
> 
>   Let's take a generic toolbox "for Scilab/Scicos", i.e. a toolbox with
> both a Scilab and a Scicos part. It would be good if we could apply the
> standart method described at wiki.scilab.org/howto/Create_a_toolbox in
> this situation as well. As an example, let's suppose that the file
> src/c/csum.c in the toolbox skeleton needs to include the header file
> scicos_block4.h. we could do the following:
> 
>     #include <scicos_block4.h> /* header file inclusion */
>     int csum(double *a, double *b, double *c)
>     {
>       ...
>     }
> 
> In order to be able to build the toolbox, we also need to add to CFLAGS
> the following directory search option:
> 
>     1. -I"$(SCIDIR)\modules\scicos_blocks\includes", in the Windows case
> 
>     or
> 
>     2. -I$(SCIDIR)/../../include/scilab/scicos_blocks/, in the GNU/Linux
>        case.
> 
>   Of course, you could say that is up to toolbox developers to handle
> this issue, by modifying the src builder with a piece of code like
> 
>     if MSDOS then
>         ... 1. ...
>     else
>         ... 2. ...
>     end
> 
>   However, in my opinion, it would be better if Scilab handled the issue
> automatically. For example, under Windows, just add line 1. to the
> INCLUDES variable in Makefile.incl.mak will do the job. A similar thing,
> I guess, could be done under GNU/Linux to change CFLAGS to something
> similar to
> 
>     CFLAGS="-I$(SCIDIR)/../../include/scilab/malloc/ 
> -I$(SCIDIR)/../../include/scilab/output_stream/ 
> -I$(SCIDIR)/../../include/scilab/mexlib/ 
> -I$(SCIDIR)/../../include/scilab/core/ " 
> CXXFLAGS="-I$(SCIDIR)/../../include/scilab/malloc/ 
> -I$(SCIDIR)/../../include/scilab/output_stream/ 
> -I$(SCIDIR)/../../include/scilab/mexlib/ 
> -I$(SCIDIR)/../../include/scilab/core/ " 
> FFLAGS="-I$(SCIDIR)/../../include/scilab/core/ 
> -I$(SCIDIR)/../../include/scilab/scicos_blocks/ "
> 
> where line 2. has been added to CFLAGS.
> 
>   What do you think about this "SEP"? comments or suggestions?
> 
> Regards,
> 
> --
> Matteo
> 



More information about the dev mailing list