({{, mcc options files 
WSTP template file compiler.}})

OpenersNotesSection(Spacer1)Details

mcc is a C and C++ compiling command for creating a program for installation into the Wolfram Language with the Wolfram Language command (RefLink[Install, paclet:ref/Install]). The installed program communicates with the Wolfram Language by using the WSTP protocol. The mcc command should have a WSTP template file as one of its file arguments along with ordinary C and C++ source files and object files, which encode the functions that are to be installed into the Wolfram Language. The WSTP template filename should bear a .tm suffix.

The mcc script first passes the template file to the Wolfram System utility (RefLink[mprep, paclet:ref/program/mprep]), which preprocesses it into a C file that uses WSTP library functions. It then invokes the compiler identified by the environment variable CC to compile and link this C file along with the other files, arguments, and the WSTP library. The mcc script checks the environment variable CXX for compiling C++ files.

On operating systems that support multiple binary formats, mcc automatically links with the appropriate library.

mcc passes all defined options through to the C compiler, but it also treats the following options specially:

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Install, paclet:ref/Install])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Setting Up External Functions to Be Called from the Wolfram Language, paclet:tutorial/SettingUpExternalFunctionsToBeCalledFromTheWolframLanguage])}, {▪(RefLinkPlain[File Organization, paclet:tutorial/WolframSystemFileOrganization])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[C/C++ Language Interface, paclet:guide/CLanguageInterface])}, {▪(RefLinkPlain[Installable WSTP Programs, paclet:guide/InstallableWSTPPrograms])}, {▪(RefLinkPlain[WSTP API, paclet:guide/WSTPAPI])}})}})