46.2. Incorporating the event builder client library

Incorporating event builder client software in your program requires that you #include the event builder client header in source files that use CEventOrderClient. You must also:

As we have done throughout this manual, assume that DAQROOT is an environment variable that points to the root directory of the NSCLDAQ installation.

The header for the event builder is named after the class as usual. Your source files will need a line like:


    #include <CEventOrderClient.h>
                

To locate this, your compilations will need to specify -I$DAQROOT/include

At link time you need to specify three switches: -L$DAQROOT/lib -lEventBuilder -Wl,"-rpath=$DAQROOT/lib". The first of these adds the NSCLDAQ library directory to the linker library search path. The second requests that libEventBuilder.so be searched to resolve undefined symbols. The last adds the NSCLDAQ library to the list of libraries searched for loadable libraries when the program starts.

If in fact you did define an environment variables DAQROOT, and this is used within a Makefile you should use $(DAQROOT) wherever $DAQROOT is used above.