guile problems

Olwe Melwasul olwe@cpinternet.com
Sun Sep 26 06:15:00 GMT 2004


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/



More information about the Cygwin mailing list