© National Instruments Corporation 2-1 AutoCode Reference2C Language ReferenceThis chapter discusses files used to interface AutoCode and the generatedC code to your specific platform and target processor. This chapter alsodescribes target-specific utilities needed for simulation and testing.Stand-Alone SimulationThe template provided for C code generation produces code that, whencompiled and linked with stand-alone files, forms a stand-alone simulation.This simulation can be executed with MATRIXx-style data as input, andproduces results that can be loaded back into Xmath for analysis. You mustcompile the generated code along with the stand-alone library to producethe simulation executable.Chapter 2, Using AutoCode, of the AutoCode User Guide describes how tocompile the code and stand-alone library, generate sample input data, andload the data into Xmath for analysis.Compiling on Various Supported PlatformsThe generated code usually includes platform-specific code. Most of thiscode is not generated by AutoCode; rather, that code exists in the template.Also, the stand-alone library has platform-specific code to deal with file I/Oand floating-point numerics. You must compile the generated code and thestand-alone library with a defined preprocessor symbol appropriate foryour platform (refer to Table 2-1). For example, on the Solaris platform,the compile statement is similar to:% acc -DSOLARIS -o simulation simmodel.c sa_*.o -lmNote This example assumes the stand-alone library was compiled into separate objectfiles into the current working directory and that the stand-alone header files also exist inthe current working directory.