[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing C pointers through guile

From: Kjetil S. Matheussen
Subject: Re: Passing C pointers through guile
Date: Wed, 9 Jul 2008 21:58:11 +0200 (CEST)

Ludovic Courtès:
>> kjetil <at> ttleush ~/guile-1.8.5 $ gcc -Iinclude/ -Llib lib/libguile.a 
>> test.c
> > /tmp/ccMcEAxd.o: In function `main':
> > test.c:(.text+0x1b): undefined reference to `scm_from_uintptr'
> > test.c:(.text+0x2c): undefined reference to `scm_to_uintptr'
> > collect2: ld returned 1 exit status
> Normally, there's no such thing as `lib/libguile.a'.  The thing is under
> `libguile/.libs/libguile.{so,a}'.  Alternatively, it might be the case
> that `SCM_HAVE_T_UINTPTR' is not defined.

Normally, yes, but I installed in the same directory as the source. :-)

Anyway, I have no idea why the above didn't work, but it works now.
I haven't changed any of the files since the last time:

address@hidden ~/guile-1.8.5 $ gcc test.c -Iinclude lib/libguile.a -lgmp -lm 
-lltdl -lcrypt
lib/libguile.a(posix.o): In function `scm_tmpnam':
posix.c:(.text+0x14b0): warning: the use of `tmpnam' is dangerous, better use 
address@hidden ~/guile-1.8.5 $ ./a.out
main: 0x804cd54, p: 804cd54
address@hidden ~/guile-1.8.5 $

reply via email to

[Prev in Thread] Current Thread [Next in Thread]