2 Link Concepts 4 Class Definitions
Link Library Programming Guide  / 

3 Linking and Initialization

Linking the link library to your module is simply a matter of adding the following line to the module’s Makefile (for GNU Make builds):

MODULE_LDFLAGS = -llink

For CMake-based builds, use target_link_libraries to link against the link library instead.

The init_local() function in the link module needs to call the SIMLINK_init_library() function:

void
init_local()
{
        /* The link library must always be initialised first. */
        SIMLINK_init_library();

        /* The rest of the module initialization */
}
2 Link Concepts 4 Class Definitions