I am using libffi to call a function. but it is not invoking the same, Also i am not getting any errors. I am expecting a float value as return but it is returning as 0.0000. I am sure that it is not the return value expected(tried hardcoding).
if ((status = ffi_prep_cif(&cif, FFI_DEFAULT_ABI,
2, &ffi_type_float, arg_types)) == FFI_OK)
{
ffi_call(&cif, my_function, result, arg_values);
}
Am i doing anything wrong here? Is there any way to check ffi_call is success or not?