CCodeGenerator`
CCodeGenerator`

CCodeStringGenerate

CCodeStringGenerate[cfun,name]

generates C code from the compiled function cfun using the name as the exported function name.

Details and Options

  • To use CCodeStringGenerate, you first need to load it using Needs["CCodeGenerator`"].
  • CCodeStringGenerate can make standalone code or a Wolfram Library.
  • The Wolfram Language contains the necessary headers and libraries for standalone code.
  • You can generate a header for the generated code by setting "CodeTarget" to "WolframRTLHeader".
  • The following option can be given:
  • "CodeTarget""WolframRTL"the type of code to generate

Examples

Basic Examples  (1)

First, load the package:

Generate a string of C code:

Generate code from two compiled functions:

Wolfram Research (2010), CCodeStringGenerate, Wolfram Language function, https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html.

Text

Wolfram Research (2010), CCodeStringGenerate, Wolfram Language function, https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html.

CMS

Wolfram Language. 2010. "CCodeStringGenerate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html.

APA

Wolfram Language. (2010). CCodeStringGenerate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html

BibTeX

@misc{reference.wolfram_2024_ccodestringgenerate, author="Wolfram Research", title="{CCodeStringGenerate}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_ccodestringgenerate, organization={Wolfram Research}, title={CCodeStringGenerate}, year={2010}, url={https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html}, note=[Accessed: 30-December-2024 ]}