Current Page: NeXtMidas Training X-Midas Interoperability XBC Adding Host Primitives
- 2. - | Adding host primitives to a NeXtMidas option tree. Make sure that XBC is on the path. Create a `buildopt.mm` macro in the `mcr` area for the option tree. Initially it can just look like this (be sure to change `MYOPT` to the name of the option tree):
           ! Calls the BUILDOPT;XBC to build the option tree.
           startmacro u:option["MYOPT"]
             BUILDOPT;SYS/mfn="nxm.xbc.mcr.buildopt.mm" ^option
           endmacro
  5. Create a `messages.cfg` file in the `cfg` area of the option tree. (Optional) Add the host primitive to the `host` area of the option tree. Then use `UPDATE` to add it to the dictionary (use `H` for the command support). Build the option tree:
         nM> MAKE ALL <OPT>
Verifying a host primitive will run in XBC The `CHECKXBC;XBC` command can be run manually to verify if a host primitive will run in XBC. See explain file for more details.