此为 Mathematica 8 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

CCodeStringGenerate


generates C code from the compiled function cfun using the name as the exported function name.
  • 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 a string of C code:
Generate code from two compiled functions:
First, load the package:
In[1]:=
Click for copyable input
Generate a string of C code:
In[2]:=
Click for copyable input
Out[2]=
Generate code from two compiled functions:
In[3]:=
Click for copyable input
Out[3]=