From what I can tell, you use bind
if the function you're calling has already been declared in a header file you've previously #include
d (including anything automatically included by chicken.h
, which all Chicken programs include). If the function you're calling is not already declared, then you need to use bind*
to emit a declaration also.
So, this would work (math.h
is already included by chicken.h
):
(use bind extras)
(bind "double cbrt(double)")
(format #t "cbrt(~a) = ~a~%" 27 (cbrt 27))