[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with foreign functions

I'm trying to run the example 4 from the file foreign.txt by following
the given sequence of commands :

       $ clisp-link create-module-set cfun callcfun.c
       $ cc -O -c cfun.c
       $ cd cfun
       $ ln -s ../cfun.o cfun.o
       Add cfun.o to NEW_LIBS and NEW_FILES in link.sh.
       $ cd ..
       $ base/lisp.run -M base/lispinit.mem -c callcfun.lsp
       $ clisp-link add-module-set cfun base base+cfun
but here i got the following error message:
+ gcc -traditional -O -W -Wswitch -Wcomment -Wpointer-arith -fomit-frame-pointer -fallow-single-precision -O2 -DDYNAMIC_MODULES -DDYNAMIC_FFI -I/usr/src/clisp -DMODULE=callcfun -c callcfun_module.cc
In file included from callcfun_module.cc:23:
/usr/src/clisp/clisp.h:335: `{anonymous struct}::._0(...)' is already defined in the class {anonymous struct}
/usr/src/clisp/clisp.h:335: `{anonymous struct}::operator =(...)' must take exactly one argument
/usr/src/clisp/clisp.h:335: confused by earlier errors, bailing out
and then
+ gcc -traditional -O -W -Wswitch -Wcomment -Wpointer-arith -fomit-frame-pointer -fallow-single-precision -O2 -DDYNAMIC_MODULES -DDYNAMIC_FFI callcfun_module.o callcfun.o cfun.o lisp.a libreadline.a libavcall.a libvacall.a libtrampoline.a -ltermcap -L/usr/X11R6/lib -lX11 -o lisp.run
gcc: callcfun_module.o: No such file or directory
+ [ -n  ]
+ to_load=
+ [ -n  ]
+ base+cfun/lisp.run -M base/lispinit.mem -q -i -x (saveinitmem "base+cfun/lispinit.mem")
/usr/local/bin/clisp-link: base+cfun/lisp.run: No such file or directory

It looks like a kind of conflict with previous definitions.
Any hint to solve the problem will be appreciated.

Thanks in advance