However, adding the same Population Callback object file to the project over and over again can get tedious, and typing a custom callback name into the Results Detail Dialog is prone to error. These issues have been addressed. The following section discusses how to add Population Callbacks to Sapphire/Web.
SaHtmlC.c has source for every Population Callback delivered with the tool. They have been written to work cross-platform, cross-language and as efficiently as possible. Use them as reference, or even copy them and make your adjustments.
To link your Population Callbacks into every CGI, locate the second occurrence of the SA_LIBS variable, and place your library or object file immediately before $(SA_LIBS) on the link line. Example:
Before:
$(LD) $(LD_FLAGS) $(OBJS) $(APPL_LIBS) $(SA_LIBS) $(SYSTEM_LIBS)
$(LIBS) $(XOPEN_LIBS) -o $(EXECUTABLE)
After:
$(LD) $(LD_FLAGS) $(OBJS) $(APPL_LIBS) /usr/local/bin/mylib.a $(SA_LIBS) $(SYSTEM_LIBS) $(LIBS) $(XOPEN_LIBS) -o $(EXECUTABLE)