signal error and exit when compilation fails
moved type definitions from ffi to ffi-header