OpenersNotesSection(Spacer1)Details

m must be a pointer to an error message string returned by (NonWLLink[MLErrorMessage(), paclet:/ref/c/MLErrorMessage]).

MLReleaseErrorMessage() is declared in the MathLink header file (RefLink[mathlink.h, paclet:/ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include <stdio.h>
#include "mathlink.h"

/* A function to print a MathLink error message */

void f(MLINK l)
{
	const char *message = MLErrorMessage(l);

	printf("MathLink Error: %s\n", message);

	MLReleaseErrorMessage(l, message);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLErrorMessage(), paclet:/ref/c/MLErrorMessage])}})}})