Mathematica > Systems Interfaces & Deployment > C/C++ Language Interface > MathLink C Language Functions >
Mathematica > Systems Interfaces & Deployment > MathLink API > MathLink C Language Functions >
MathLink C Function

MLVersionNumbers()

void MLVersionNumbers(MLENV ep, int *inumb, int *rnumb, int *bnumb)
returns the MathLink API interface number, revision number, and build number and stores them respectively in inumb, rnumb, and bnumb.
  • For computer systems where the MathLink libraries are distributed as dynamic library modules, MLVersionNumbers() allows a runtime inspection of the version information for the MathLink library.
  • MLVersionNumbers() will also function for programs that use the MathLink library statically; however, the function return values will not change.
  • MLVersionNumbers() is declared in the MathLink header file mathlink.h.
#include <stdio.h>
#include "mathlink.h"

int main()
{
    MLENV env;
    int interface;
    int revision;
    int build;

    env = MLInitialize((char *)0);
    if(env == (MLENV)0)
        { /* unable to initialize the MathLink environment */ }

    MLVersionNumbers(env, &interface, &revision, &build);

    if(!(interface >= 3))
        {
        printf("Incorrect MathLink library available.\n");
        MLDeinitialize(env);
        return 1;
        }

    /* ... */

    MLDeinitialize(env);

    return 0;
}
© 2008 Wolfram Research, Inc.
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team