Incorporating event builder client software in your program requires
that you #include the event builder client
header in source files that use
You must also:
Provide the appropriate -I switch so that your compilations will locate the header.
Provide the appropriate linker switches so that your program will link with the event builder client libraries and so that the Linux dynamic loader can locate them at run-time.
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:
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.