From: Fu-Gangqiang <lispor@163.com>
To: "Guile bug" <bug-guile@gnu.org>
Subject: Can not work with libguile-2.0
Date: Thu, 17 Feb 2011 20:02:38 +0800 (CST) [thread overview]
Message-ID: <1e640654.925f.12e338022b5.Coremail.lispor@163.com> (raw)
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!
next reply other threads:[~2011-02-17 12:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 12:02 Fu-Gangqiang [this message]
2011-02-17 13:02 ` Can not work with libguile-2.0 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1e640654.925f.12e338022b5.Coremail.lispor@163.com \
--to=lispor@163.com \
--cc=bug-guile@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).