This is an example of how you can use function rdl_getLastError().
/* * error - retrieve and print Rulbus error. */ int error() { const int len = 100; char msg[len]; rdl_getLastError( msg, len ); fprintf( stdout, "%s\n", msg ); return 1; }