Link with Scilab
Romain Cotte
Romain.Cotte at USherbrooke.ca
Wed Sep 9 00:21:13 CEST 2009
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)
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' !
!adBuffer.c:89: error: expected specifier-qualifier-list before
'longint' !
!adBuffer.c:115: error: expected specifier-qualifier-list before
'longint' !
!adBuffer.c:118: error: extra brace group at end of
initializer !
!adBuffer.c:118: error: (near initialization for
'adi8fbuf_') !
!adBuffer.c:118: warning: excess elements in struct
initializer !
!adBuffer.c:118: warning: (near initialization for
'adi8fbuf_') !
!adBuffer.c:118: warning: (near initialization for
'adi8fbuf_') !
!adBuffer.c:151: error: expected specifier-qualifier-list before
'longint' !
!adBuffer.c:152: warning: excess elements in struct
initializer !
!adBuffer.c:152: warning: (near initialization for
'mmcomtraffic_') !
!adBuffer.c:152: warning: excess elements in struct
initializer !
!adBuffer.c:152: warning: (near initialization for
'mmcomtraffic_') !
!adBuffer.c:404: error: expected ')' before '*'
token !
!adBuffer.c:427: error: expected ')' before '*'
token !
!adBuffer.c:451: error: expected ')' before '*'
token !
!adBuffer.c: In function
'addftraffic_': !
!adBuffer.c:894: error: 'struct mmcomtraffic_1_' has no member named
'mmftraffic' !
!adBuffer.c:907: error: 'struct mmcomtraffic_1_' has no member named
'mmftrafficm' !
!adBuffer.c:908: error: 'struct mmcomtraffic_1_' has no member named
'mmftraffic' !
!adBuffer.c: In function
'printtraffic_': !
!adBuffer.c:924: error: 'longint' undeclared (first use in this
function) !
!adBuffer.c:924: error: (Each undeclared identifier is reported only
once !
!adBuffer.c:924: error: for each function it appears
in.) !
!adBuffer.c:924: error: expected ';' before
'i8__1' !
!adBuffer.c:939: error: 'struct mmcomtraffic_1_' has no member named
'mmftrafficm' !
!adBuffer.c:942: error: 'i8__1' undeclared (first use in this
function) !
!adBuffer.c:942: error: 'struct mmcomtraffic_1_' has no member named
'mmftraffic' !
!adBuffer.c: In function
'printbuffertop_': !
!adBuffer.c:991: error: 'struct adi8fbuf_1_' has no member named
'adi8ibuf' !
!adBuffer.c: In function
'smallstacksize_': !
!adBuffer.c:1043: error: 'struct adi8fbuf_1_' has no member named
'adi8ibuf'
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
version scilab 5.1.1
More information about the users
mailing list