Compiling and Linking

For STEP programming, you will use the stp_aim EXPRESS class library, the stix meshing and extensions library, the rose and rosemath core libraries, and possibly some support libraries.

Add the following include directories to your C++ project settings, with some additional settings when linking DLLs.

/I"$(ROSE_INCLUDE)"
/I"$(ROSE_INCLUDE)/stp_aim"
/I"$(ROSE_INCLUDE)/stix" 	==> Windows

-I$(ROSE_INCLUDE)
-I$(ROSE_INCLUDE)/stp_aim
-I$(ROSE_INCLUDE)/stix  	==> Unix

Your library path should contain the directory under $(ROSE)/lib that matches your compiler configuration, and your link line should contain the following libraries.

Windows DLL:     stixdll.lib  stp_aimdll.lib  rosemathdll.lib  rosedll.lib
  Debug DLL:     stixdlld.lib stp_aimdlld.lib rosemathdlld.lib rosedlld.lib
Windows static:	 stix.lib     stp_aim.lib     rosemath.lib     rose.lib dtnurbsc.lib vcf2c.lib

Unix shared:     -lstix -lstp_aim -lrosemath -lrose
Unix static:     -lstix -lstp_aim -lrosemath -lrose -ldtnurbsc -lf2c

Naming Conventions

The STEP data classes use a "stp_" prefix, like "stp_point". This prefix isn't part of the original EXPRESS definition (just "point"), but we add it to the C++ classes to clearly identify them. The STEP extensions that we provide for meshing and other operations use "Stix" class and "stix_" function prefixes.

Common classes and functions that work across both STEP, IFC, IGES, CIS2, or other standards, such as general file and math functions, are prefixed with "Rose" and "rose_".

The naming used across all of our C++ libraries are summarized below:

Contents               class     functions
--------               -----     ---------
STEP data              stp_      n/a    (stplib_ for a few init fns)
STEP meshing, etc.     Stix      stix_      

IFC data               Ifc       n/a    (ifclib_ for a few init fns)
IFC meshing, etc.      Ifcx      ifcx_ 

IGES data              igs_      n/a    (igslib_ for a few init fns)

Common file, math      Rose      rose_        

Header Files and Startup

Three headers bring in all of the definitions that you are likely to use in your program. The stp_schema.h header brings in the EXPRESS classes, stix.h brings in STEP extension functions, and rosemath.h brings CAD math functions.

You must call the stplib_init() function once near the start of your application to initialize handling of STEP files with the merged schema.

#include <stp_schema.h>  // all express classes
#include <stix.h>	       // all extension functions
#include <rosemath.h>    // all cad math functions

int main(int argc, char* argv[])
{
    stplib_init();

    // body of program
}

Distributing Applications

Applications built with the STEP EXPRESS library do not need any additional support files. Calling the stplib_init() function initializes all of the run-time support data previously supplied by the ST-Runtime package.