unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: Guile-user Digest, Vol 41, Issue 5
       [not found] <E1FRAVo-00075i-V4@smartmx-01.inode.at>
@ 2006-04-05 17:55 ` Ido Yehieli
  0 siblings, 0 replies; only message in thread
From: Ido Yehieli @ 2006-04-05 17:55 UTC (permalink / raw)


Thanks,
    that helped.

Maybe the code  in gnu.org need to be changed?

Ido Yehieli

guile-user-request@gnu.org wrote:

>Send Guile-user mailing list submissions to
>	guile-user@gnu.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://lists.gnu.org/mailman/listinfo/guile-user
>or, via email, send a message with subject or body 'help' to
>	guile-user-request@gnu.org
>
>You can reach the person managing the list at
>	guile-user-owner@gnu.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Guile-user digest..."
>
>
>Today's Topics:
>
>   1. compiling and linking a trivial guile example (Ido Yehieli)
>   2. Re: compiling and linking a trivial guile example
>      (Chusslove Illich)
>   3. Re: compiling and linking a trivial guile example
>      (dsmich@adelphia.net)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Wed, 05 Apr 2006 12:53:42 +0200
>From: Ido Yehieli <ido.yehieli@streamunlimited.com>
>Subject: compiling and linking a trivial guile example
>To: guile-user@gnu.org
>Message-ID: <4433A1B6.8030901@streamunlimited.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>Hi,
>     I've contemplating embedding guile as a scripting language in one 
>of      my c++ applications.
>
>I've been reading the reference manual, and tried compiling the first 
>example
>(from 
>http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Linking-Guile-into-Programs.html#Linking-Guile-into-Programs):
>
>*****start simple-guile.c*****
>      #include <stdlib.h>
>      #include <libguile.h>
>
>      static SCM
>      my_hostname (void)
>      {
>        return scm_str2string (getenv ("HOSTNAME"));
>      }
>
>      static void
>      inner_main (void *data, int argc, char **argv)
>      {
>        scm_c_define_gsubr ("my-hostname", 0, 0, 0, my_hostname);
>        scm_shell (argc, argv);
>      }
>
>      int
>      main (int argc, char **argv)
>      {
>        scm_boot_guile (argc, argv, inner_main, 0);
>        return 0; /* never reached */
>      }
>***** end  simple-guile.c*****
>
>
>like instructed, with:
>
>gcc -o simple-guile simple-guile.c -lguile
>
>
>However, i get this error message:
>
>/tmp/ccerLXy4.o: In function `my_hostname':simple-guile.c:(.text+0x16): 
>undefined reference to `scm_str2string'
>
>
>I tried also compiling it with:
>
>gcc -o simple-guile simple-guile.c -lguile -lguile-ltdl -lqthreads 
>-lpthread -lcrypt -lm
>
>because 'guile-config link' gave the following:
>
>-lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm
>
>
>but to no avail. guile-config compile returns an empty line.
>What am I doing wrong?
>
>Thanks,
>Ido Yehieli.
>
>
>
>
>------------------------------
>
>Message: 2
>Date: Wed, 5 Apr 2006 14:05:32 +0200
>From: Chusslove Illich <caslav.ilic@gmx.net>
>Subject: Re: compiling and linking a trivial guile example
>To: guile-user@gnu.org
>Message-ID: <200604051405.37244.caslav.ilic@gmx.net>
>Content-Type: text/plain; charset="utf-8"
>
>  
>
>>[: Ido Yehieli :]
>>return scm_str2string (getenv ("HOSTNAME"));
>>[...]
>>/tmp/ccerLXy4.o: In function `my_hostname':simple-guile.c:(.text+0x16):
>>undefined reference to `scm_str2string'
>>    
>>
>
>scm_str2string doesn't seem to exist. If you use -Wall when compiling, 
>it'll warn about implicit declaration.
>
>Use scm_makfrom0str for deep copy, or scm_take0str for shallow copy (this 
>all Guile 1.6, don't know about 1.8).
>
>  
>



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-05 17:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1FRAVo-00075i-V4@smartmx-01.inode.at>
2006-04-05 17:55 ` Guile-user Digest, Vol 41, Issue 5 Ido Yehieli

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).