[scilab-Users] Link with Scilab

Romain Cotte Romain.Cotte at USherbrooke.ca
Wed Sep 9 18:53:48 CEST 2009


Thanks for help.
It was only to explain in general case but actually, here, lib1.o is for
adStack.o, lib2.o for adBuffer.o, subroutine.o for rosenf_b.o.


I also tried to call
l=ilib_for_link('rosenf',['adStack.c','adBuffer.f','rosenf_b.f'],[],'f');


It uses the right Makefile in TMPDIR however i have the same errors and moreover
:


!perl: warning: Setting locale failed.
!perl: warning: Please check that your locale settings:
!	LANGUAGE = "",
!	LC_ALL = (unset),
!	LC_NUMERIC = "C",
!	LC_MESSAGES = "fr_CA",
!	LANG = "C"
!    are supported and installed on your system.
!perl: warning: Falling back to the standard locale ("C").
!   characters:
!   BLOCK DATA characters:
!   pushcharacter:
!perl: warning: Setting locale failed.
!perl: warning: Please check that your locale settings:
!	LANGUAGE = "",
!	LC_ALL = (unset),
!	LC_MESSAGES = "fr_CA",
!	LC_NUMERIC = "C",
!	LANG = "C"
!    are supported and installed on your system.
!perl: warning: Falling back to the standard locale ("C").
!   lookcharacter:
!   popcharacter:







Quoting Sylvestre Ledru <sylvestre.ledru at scilab.org>:

> Le mardi 08 septembre 2009 à 18:21 -0400, Romain Cotte a écrit :
> >
> >
> >
> >
> > Hello,
> >
> > I would like to make a link with fortran code but which needs a C
> > library. I can obtain an executable a.out by this way :
> >
> > gcc -c lib1.c lib2.f subroutine.f
> >
> > I tried : l=ilib_for_link('rosen',['lib1.o','lib2.o','subroutine.o'],
> > [],'f',PWD+'/Makefile');
> > (gcc -c lib1.c -o lib1.o)
> If you are using scilab >= 5.0, please use actual file name (.c instead
> of .o).
> Makefile are no longer necessary (they are generated on the fly).
>
> > but i get errors which are only warnings with gcc :
> >
> > !adStack.c:351: warning: format '%li' expects type 'long int', but
> > argument 4 has type 'int'  !
> > !adBuffer.c:41: error: expected specifier-qualifier-list before
> > 'longint'                     !
> Looks like a missing include.
> By the way, I cannot see any references to adBuffer.c or adStack.c in
> your command upper (ilib_for_link).
>
> > I wonder if it's possible to modify options for compilation or if
> > there is an another way.
> > Makefile :
> >
> > OBJS =  rosenf.o
> > OTHERLIBS =
> > LIBRARY = librosenf
> > include $(SCIDIR)/Makefile.incl
> > CFLAGS = $(CC_OPTIONS)
> > FFLAGS = $(FC_OPTIONS)
> > EXTRA_LDFLAGS =
> > include $(SCIDIR)/config/Makeso.incl
> Where did you find this makefile ?
> This way of using dynamic link has been deprecated a while ago.
>
> Sylvestre
>
> --
> -------------------------
> Sylvestre Ledru
> -------------------------
> The Scilab Consortium
> Digiteo
> Domaine de Voluceau
> Rocquencourt - B.P. 105
> 78153 Le Chesnay Cedex
> France
>
>
>






More information about the users mailing list