Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <mathlink.h>
- #include <stdio.h>
- #include <stdlib.h>
- void MAXF(char* ex1, char* ex2, char** result){
- MLINK lp;
- int pkt;
- MLEnvironment env;
- env = MLInitialize(NULL);
- if (env == NULL) return;
- int argcs = 4;
- char *argvs[5] = {"-linkmode", "launch", "-linkname", "math -mathlink", NULL};
- lp = MLOpen(argcs, argvs);
- if (lp == NULL) return;
- *result = malloc(100);
- sprintf(*result, "0");
- MLPutFunction(lp, "Exit", 0L);
- MLClose(lp);
- MLDeinitialize(env);
- };
- int main(){
- char* test;
- MAXF("0", "0", &test);
- return 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement