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

MLINK


is a MathLink type representing a MathLink link object.
  • MLINK is defined in the file mathlink.h, which should be included in the source code for any MathLink-compatible program.
#include "mathlink.h"

int main(int argc, char **argv)
{
    MLENV ep;
    MLINK lp;
    long error;

    ep = MLInitialize((MLParametersPointer)0);
    if(ep == (MLENV)0)
        { /* unable to initialize environment */ }

    lp = MLOpenArgcArgv(ep, argv, argv + argc, &error);
    if(lp == (MLINK)0 || error != MLEOK)
        { /* unable to create link */ }

    /* ... */

    MLClose(lp);
    MLDeinitialize(ep);
    return 0;
}
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF