* Guile 2.0.0 manual extensions example
@ 2011-03-25 16:50 Hans Aberg
2011-03-25 17:25 ` Mark Harig
0 siblings, 1 reply; 3+ messages in thread
From: Hans Aberg @ 2011-03-25 16:50 UTC (permalink / raw)
To: bug-guile
The example in the Guile 2.0.0 manual, "Writing Guile Extensions", sec. 2.4, uses deprecated code, and does not indicate correct compiling options.
Below is a modified code, which I compiled (Mac OS X 10.6.6) using
gcc `guile-config compile` `guile-config link` -dynamiclib -o libguile-bessel.so bessel.c
Here, the guile-config part is necessary, as the headers are now in a subdirectory. If excluded one will use the header from 1.8.
Hans
----
#include <math.h>
#include <libguile.h>
SCM j0_wrapper(SCM x) {
return scm_from_double(j0(scm_to_double(x)));
}
void init_bessel() {
scm_c_define_gsubr("j0", 1, 0, 0, j0_wrapper);
}
----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guile 2.0.0 manual extensions example
2011-03-25 16:50 Guile 2.0.0 manual extensions example Hans Aberg
@ 2011-03-25 17:25 ` Mark Harig
2011-03-25 19:29 ` Hans Aberg
0 siblings, 1 reply; 3+ messages in thread
From: Mark Harig @ 2011-03-25 17:25 UTC (permalink / raw)
To: haberg-1; +Cc: bug-guile
On Fri, Mar 25, 2011 at 05:50:58PM +0100, Hans Aberg wrote:
> The example in the Guile 2.0.0 manual, "Writing Guile
> Extensions", sec. 2.4, uses deprecated code, and does not
> indicate correct compiling options.
>
> Below is a modified code, which I compiled (Mac OS X
> 10.6.6) using
> gcc `guile-config compile` `guile-config link` \
> -dynamiclib -o libguile-bessel.so bessel.c
>
> Here, the guile-config part is necessary, as the headers
> are now in a subdirectory. If excluded one will use the
> header from 1.8.
>
Andy Wingo reported that he had fixed the deprecated code in this
message (after Guile 2.0 was released):
http://lists.gnu.org/archive/html/bug-guile/2011-02/msg00114.html
Also, there has been some discussion of using "guile-config"
versus "pkg-config". Bruno Haible asked the question
"guile-config deprecated or not?", starting here:
http://lists.gnu.org/archive/html/bug-guile/2011-02/msg00117.html
---
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-25 19:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 16:50 Guile 2.0.0 manual extensions example Hans Aberg
2011-03-25 17:25 ` Mark Harig
2011-03-25 19:29 ` Hans Aberg
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).