From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ido Yehieli Newsgroups: gmane.lisp.guile.user Subject: compiling and linking a trivial guile example Date: Wed, 05 Apr 2006 12:53:42 +0200 Message-ID: <4433A1B6.8030901@streamunlimited.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1144234460 17318 80.91.229.2 (5 Apr 2006 10:54:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Apr 2006 10:54:20 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Apr 05 12:54:15 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FR5eF-0005Hx-63 for guile-user@m.gmane.org; Wed, 05 Apr 2006 12:54:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FR5eE-0006Lu-Ms for guile-user@m.gmane.org; Wed, 05 Apr 2006 06:54:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FR5eA-0006LX-Ls for guile-user@gnu.org; Wed, 05 Apr 2006 06:53:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FR5e8-0006LG-Nv for guile-user@gnu.org; Wed, 05 Apr 2006 06:53:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FR5e8-0006LD-LT for guile-user@gnu.org; Wed, 05 Apr 2006 06:53:56 -0400 Original-Received: from [213.229.60.38] (helo=smartmx-06.inode.at) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FR5hd-0002vo-4X for guile-user@gnu.org; Wed, 05 Apr 2006 06:57:33 -0400 Original-Received: from [83.64.248.67] (port=29803 helo=[192.168.0.69]) by smartmx-06.inode.at with esmtpa (Exim 4.50) id 1FR5e5-0000ix-Lz for guile-user@gnu.org; Wed, 05 Apr 2006 12:53:53 +0200 User-Agent: Mail/News 1.5 (X11/20060309) Original-To: guile-user@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5239 Archived-At: 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 #include 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. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user