in stdlib.h // C header typedef: typedef SystemC = ffi.Int32 Function(ffi.Pointer<Utf8> command); // Dart header typedef: typedef SystemDart = int Function(ffi.Pointer<Utf8> command); // Load `stdlib`. On macOS this is in libSystem.dylib. final dylib = ffi.DynamicLibrary.open('/usr/lib/libSystem.dylib'); // Look up the system function. final systemP = dylib.lookupFunction<SystemC, SystemDart>('system');