Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >

CCodeGenerate


generates C code from the compiled function cfun using the name as the exported function name, and saves in the file .

generates output in filename.

generates C code from several compiled functions and saves in filename.
  • To use , you first need to load it using Needs.
  • Mathematica contains the necessary headers and libraries for standalone code.
  • You can generate a header for the generated code by setting to .
  • The following option can be given:
"CodeTarget""WolframRTL"the type of code to generate
First, load the package:
Generate C code into a file:
Display the file of C code:
Generate code from two compiled functions:
Display the file of C code:
First, load the package:
In[1]:=
Click for copyable input
Generate C code into a file:
In[2]:=
Click for copyable input
Out[2]=
Display the file of C code:
Generate code from two compiled functions:
In[4]:=
Click for copyable input
Out[4]=
Display the file of C code:
First, load the package:
By default, standalone C code is generated:
This generates the header file for the export:
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
格式:   HTML  |  CDF