Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > C/C++ Language Interface > Installable MathLink Programs >
Mathematica > Systems Interfaces & Deployment > MathLink API > Installable MathLink Programs >

Install

Install["name"]
starts a MathLink-compatible external program and installs Mathematica definitions to call functions in it.
  • The Mathematica definitions set up by Install are typically specified in the MathLink template file used to create the source code for the external program.
  • Install["prog"] will launch the specified program, then connect to it via MathLink.
  • If prog is a directory, Install["prog"] will try to execute prog/$SystemID/prog.
  • Install["name`"] searches all directories on $Path for a file or directory called name.exe.
  • Install[link] will take an existing LinkObject and set up what is needed to call functions in the program corresponding to that LinkObject.
  • LinkPatterns[link] gives a list of the patterns defined when the specified link was set up.
  • You can remove these definitions and terminate the execution of the external program by calling Uninstall[link].
  • Install[LinkConnect["port"]] will install an external program that has created a link on the specified port. You can use this to call external programs that have been started in a debugger or on a remote computer system.
  • If you call Install["command"] multiple times with the same command, the later calls will overwrite definitions set up by earlier ones, unless the definitions depend on the values of global variables which have changed.
  • Install sets up definitions which send CallPacket objects to the external program whenever functions in it are called, and waits for results to be returned in ReturnPacket objects.
  • The external program can send EvaluatePacket objects back to Mathematica to request evaluations while the program is running.
Set the directory:
Install an external MathLink-compatible program:
Get usage information about linked-in symbols:
Use the new function:
Terminate the external program:
Reset to the original directory:
Set the directory:
In[1]:=
Click for copyable input
Install an external MathLink-compatible program:
In[2]:=
Click for copyable input
Out[2]=
Get usage information about linked-in symbols:
Use the new function:
In[4]:=
Click for copyable input
Out[4]=
Terminate the external program:
In[5]:=
Click for copyable input
Out[5]=
Reset to the original directory:
In[6]:=
Click for copyable input
Set the directory:
Install an external MathLink-compatible program:
Get the complete set of LinkPatterns installed:
Get usage information about linked-in symbols:
Use the new function:
Uninstall the external program:
Reset to the original directory:
New in 2 | Last modified in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team