unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Can not work with libguile-2.0
@ 2011-02-17 12:02 Fu-Gangqiang
  2011-02-17 13:02 ` Hans Aberg
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Fu-Gangqiang @ 2011-02-17 12:02 UTC (permalink / raw)
  To: Guile bug

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!



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-02-20 10:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17 12:02 Can not work with libguile-2.0 Fu-Gangqiang
2011-02-17 13:02 ` Hans Aberg
2011-02-17 13:40 ` Fu-Gangqiang
2011-02-17 18:04 ` Mark Harig
2011-02-17 18:23 ` Mark Harig
2011-02-18  8:41   ` Andy Wingo
2011-02-17 19:08 ` Mark Harig
2011-02-18  8:53   ` Andy Wingo
2011-02-18 19:42     ` Mark Harig
2011-02-20 10:13       ` Andy Wingo
2011-02-18  1:39 ` Fu-Gangqiang
2011-02-18  8:34 ` Andy Wingo
2011-02-19 15:30   ` linking with libguile-2.0, rpath Bruno Haible
2011-02-20 10:58     ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).