Just an update. The comment by High Performance Mark on the question did a great job of answering the question. I wanted to provide a link to some more current documentation.
Have a look at C Interoperability which describes the options for calling C libraries. Note that Chapel supports a way to call C code directly (without explicitly using the foreign function interface) with the extern block feature.
extern {
#include <stdio.h>
static void hello(void) {
printf("Hello Chapel and C Interoperability!\n");
}
}
hello();
There's quite a lot more you can do - see the C Interoperability document linked above for details.
Just an update. The comment by High Performance Mark on the question did a great job of answering the question. I wanted to provide a link to some more current documentation.
Have a look at C Interoperability which describes the options for calling C libraries. Note that Chapel supports a way to call C code directly (without explicitly using the foreign function interface) with the extern block feature.
There's quite a lot more you can do - see the C Interoperability document linked above for details.
Another interesting option for working with libraries is the Python/Chapel integration module.