there was a mistake in my previous post, i wanted to say int cfunc (int,int,char *), suggestion answered to use '*:
(define cfunc (foreign-library-function "libguile-cfunc" "cfunc" #:return-type int #:arg-types (list int int '*))) works at this step but gives an error later: (cfunc 3 27 "toto") ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure foreign-call: Wrong type argument in position 1 (expecting POINTER_P): "toto" On Fri, Dec 30, 2022 at 10:36 AM Damien Mattei <damien.mat...@gmail.com> wrote: > hi, > how do i declare in Guile a function that in C is of this type: > int foo(int,int,char *) > the problem i have is with the char *: > (define cfunc (foreign-library-function "libguile-cfunc" "openmp" > #:return-type int #:arg-types (list int int ????))) > i do not know what to put in place of ???? > > Regards, > Damien > > note: what if const char* ? (not sure i need it) >