Compiling and Linking

For IFC programming, you will use the ifcbim EXPRESS class library, the ifcx 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)/ifcbim"
/I"$(ROSE_INCLUDE)/ifcx" 	==> Windows

-I$(ROSE_INCLUDE)
-I$(ROSE_INCLUDE)/ifcbim
-I$(ROSE_INCLUDE)/ifcx  	==> 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:     ifcxdll.lib  ifcbimdll.lib  rosemathdll.lib  rosedll.lib
  Debug DLL:     ifcxdlld.lib ifcbimdlld.lib rosemathdlld.lib rosedlld.lib
Windows static:	 ifcx.lib     ifcbim.lib     rosemath.lib     rose.lib dtnurbsc.lib vcf2c.lib

Unix shared:     -lifcx -lifcbim -lrosemath -lrose
Unix static:     -lifcx -lifcbim -lrosemath -lrose -ldtnurbsc -lf2c

Naming Conventions

The IFC EXPRESS definitions all have a "Ifc" prefix, like "IfcPoint". We use these names unchanged for the C++ classes. The IFC extensions that we provide for meshing and other operations are prefixed with "Ifcx" for classes and "ifcx_" for functions.

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
--------               -----     ---------
IFC data               Ifc       n/a    (ifclib_ for a few init fns)
IFC meshing, etc.      Ifcx      ifcx_ 

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

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 ifc_schema.h header brings in the EXPRESS classes, ifcx.h brings in IFC extension functions, and rosemath.h brings CAD math functions.

You must call the ifclib_init() function once near the start of your application to initialize handling of IFC files.

#include <ifc_schema.h>   // all express classes
#include <ifcx.h>         // all extension functions
#include <rosemath.h>     // all cad math functions

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

    // body of program
}

Distributing Applications

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