delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/25/23:38:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Node: 2
Message-ID: <415639A3.3040903@cpinternet.com>
Date: Sat, 25 Sep 2004 22:38:11 -0500
From: Olwe Melwasul <olwe AT cpinternet DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: guile problems
X-IsSubscribed: yes

I'm using CYGWIN_NT-5.1 and the 1.6.4 guile and trying to work throught 
the tutorial http://lonelycactus.com/guilebook/

The first example program, however, won't compile and gives these errors:
---
$ make
gcc `guile-config link` -o hello_world main.o
main.o(.text+0x1f): In function `main':
/home/User/olwelaptopstore/programming/guile/example1/main.c:10: 
undefined reference to `_scm_init_guile'
main.o(.text+0x2b):/home/User/olwelaptopstore/programming/guile/example1/main.c:13: 
undefined reference to `_scm_c_primitive_load'
main.o(.text+0x37):/home/User/olwelaptopstore/programming/guile/example1/main.c:15: 
undefined reference to `_scm_c_lookup'
main.o(.text+0x45):/home/User/olwelaptopstore/programming/guile/example1/main.c:16: 
undefined reference to `_scm_variable_ref'
main.o(.text+0x53):/home/User/olwelaptopstore/programming/guile/example1/main.c:18: 
undefined reference to `_scm_call_0'
collect2: ld returned 1 exit status
make: *** [hello_world] Error 1
---
Here's the programs:

#include <stdio.h>
#include <stdlib.h>
#include <libguile.h>

int main (int argc, char *argv[])
{
	SCM func_symbol;
	SCM func;
	
	scm_init_guile();
	
	// Load the scheme function definitions
	scm_c_primitive_load ("script.scm");	
	
	func_symbol = scm_c_lookup("do-hello");
	func = scm_variable_ref(func_symbol);
	
	scm_call_0 (func);

	exit(EXIT_SUCCESS);

} 

---

CDEBUG = -g -Wall
CFLAGS = $(CDEBUG) `guile-config compile`
LDFLAGS = `guile-config link`

SRCS = main.c
OBJS = main.o

hello_world: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

---

I put /usr/include in my PATH by hand. I can't think of anything else other than guile-config not working properly.

Olwe

	



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019