bug-guile
[Top][All Lists]
Advanced

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

Can not work with libguile-2.0


From: Fu-Gangqiang
Subject: Can not work with libguile-2.0
Date: Thu, 17 Feb 2011 20:02:38 +0800 (CST)

Hi,all
I learn guile from manual,and I can not work with libguile and find some manual 
bugs.

scheme@(guile-user)> (version)
$1 = "2.0.0"
$ build-aux/config.guess 
i686-pc-linux-gnu
$ uname -a
Linux 2.6.32-28-generic #55-Ubuntu SMP i686 GNU/Linux
 $ ./config.status  --config
'--disable-deprecated' 'BDW_GC_CFLAGS=-L/usr/local/lib' 'BDW_GC_LIBS=-lgc'

In manual section 2.3(Linking Guile into Programs)

I follow the example,run it and have something wrong:
---->cut here<----
$ gcc -o simple-guile simple-guile.c  `pkg-config --cflags --libs guile-2.0`
$ ./simple-guile 
./simple-guile: error while loading shared libraries: libguile-2.0.so.22: 
cannot open shared object file: No such file or directory
---->cut here<----
but I have libguile-2.0.so.22 installed in /usr/local/lib directroy
$ pkg-config --cflags --libs guile-2.0
-pthread -L/usr/local/lib -I/usr/local/include/guile/2.0  -L/usr/local/lib 
-lguile-2.0 -lgc  
$ ls /usr/local/lib | grep libguile
libguile-2.0.a
libguile-2.0.la
libguile-2.0.so
libguile-2.0.so.22
libguile-2.0.so.22.0.0
libguilereadline-v-18.a
libguilereadline-v-18.la
libguilereadline-v-18.so
libguilereadline-v-18.so.18
libguilereadline-v-18.so.18.0.0

when I follow section 5.1.2(A Sample Guile Main Program) using Autoconf tools 
also have some problem:
<I do not know how to use the autoconf tool, I just follow the giving example>
$ aclocal
$ autoconf
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
./configure: line 2490: GUILE-FLAGS: command not found
configure: creating ./config.status
config.status: creating Makefile
$ make
gcc -c @GUILE_CFLAGS@ simple-guile.c
gcc: @GUILE_CFLAGS@: No such file or directory
simple-guile.c:1:22: error: libguile.h: No such file or directory
make: *** [simple-guile.o] Error 1

And in section 2.4(Writing Guile Extensions)
There are some deprecated functions in the example,also in the section 5.2.1(A 
Sample Guile Extension)
I use scm_from_double,scm_to_double instead,
I run the mannal cmd and also have something wrong:
---->cut here<----
$ gcc -shared -o libguile-bessel.so -fPIC t1.c 
t1.c:2:22: error: libguile.h: No such file or directory
t1.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before 
‘j0_wrapper’
t1.c: In function ‘init_bessel’:
t1.c:13: error: ‘j0_wrapper’ undeclared (first use in this function)
t1.c:13: error: (Each undeclared identifier is reported only once
t1.c:13: error: for each function it appears in.)
---->cut here<----
But when I run cmd:
gcc -shared -o libguile-bessel.so -fPIC t1.c `pkg-config --cflags --libs 
guile-2.0`
everything is OK!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]