Compilation

Compiler

You need a C++ compiler that is at least somehow up to the standard C++ library as defined in the 1997 Stroustrup C++ book. Usable are MS Visual C++ and recent versions of g++.

Configuration

There are some variables to be set in Tools/ToolsConfig.h and ChannelArchiver/ArchiverConfig.h. You have to read those header files in whole and hopefully the comments will help in deciding on the proper settings.
Unfortunately, C++ object files are rarely recognized by different compilers. This means that you have to compile all the C++ code with the same compiler. If you use g++ for the ChannelArchiver, the C++ parts of EPICS base have to be compiled with the same compiler (some files in base/src/libCom). Otherwise you'll see link errors like missing "osiTime" classes.

Make system

Most parts of the ChannelArchiver use the standard EPICS make system for extensions (Makefile, Makefile.Host). This allows building for WIN32 and UNIX. The master ChannelArchiver/Makefile will build the Tools & LibIO libraries first, then Manager, ..., Engine.
Because the ChannelArchiver uses files in the Tools directory, it should be parallel to the ChannelArchiver tree like this: Neither the name "extensions" nor "src" is imperative here. The point is that relative to ChannelArchiver there are ../Tools and ../../config directories. If your setup is different, you will have to change the makefiles.

CGIExport

The CGIExport tool is meant to be called from the web server. IF your EPICS make system is setup to build the EPICS base libraries as shared libraries, this is unfortunate because then LD_LIBRARY_PATH might have to be adjusted so that the web server can find the shared libraries (Com, ca), which is not easy to do in general.
Alternatively, change the make system to not use shared libraries or watch the make system as it builds CGIExport. Spot the section where it links CGIExport, copy that out and write your own command line where you link the static libraries instead of the shared ones. Example: Replace the -lCom arguement with the full path to the static library ala ....../base/lib/Linux/libCom.a. CCGIExport/link.sh is one example that works for me on Linux.

WinBrowser

For the Winbrowser, only MS Visual C++ project files are included because this tool is not portable to Unix.

CASI

For CASI, a Makefile.Win32 and Makefile.Unix is included because the EPICS make-system doesn't handle SWIG and the various supported scripting languages.

MS Visual C++ specials

For MS Visual C++, alternative project files are included in addition to most makefiles. When using those, the sources under Tools & LibIO are compiled as individial object files to ease developement & debugging (for me. If you don't like it, don't use it).
Also caused by this multi-platform developement with differnet make systems:
  1. The real code is contained in *.cpp files. Since the EPICS make system works on *.cc files only, these *.cc files are stubs, simply inclusing the *.cpp files.
  2. Though I'm trying to avoid this by using CVS, some files might accidentially and partially be in "DOS" format. This can cause warnings in a UNIX build, but hasn't been a problem so far, except for Makefile used on Unix which have to be in Unix format, while MSVC project files have to be in DOS format.

Use of EPICS base

net_convert.h and osiTime.* might cause compile errors. Otherwise, neither MS VC++ nor g++ (egcs-2.91.66) should give severe warnings that relate to the ChannelArchiver files except for many warning in Tools/gnu_regex.c (only used w/ WIN32).

net_convert.h

LibIO depends on base/src/ca/net_convert.h and osiTime.*. Hopefully the functionality of net_convert.h will some day be exported from base. For now I just use net_convert.h as it is by adding base/src/ca to the include path.
With some versions of EPICS base this has caused problems for WIN32, Linux and other architectures that require byte-swapping: If you get missing dbr_htond messages from the linker, your net_convert.h and convert.c don't export those functions.
Solution: Find where the missing routines are defined in net_convert.h as macros and make sure that they are not disabled, (i.e. moved into convert.c and not exported from there).

osiTime

osiTime.* has seen some changes between EPICS releases. I based LibIO on EPICS/base Version 3.13.1..0 (no typo) but it also compiles with 3.13.1.1 and 3.13.3.
The #define OLD_osiTime is used to determine the osiTime version.
(I tried to base this on the settings in EPICS base/include/epicsVersion.h but the resulting switch was messy and probably always incomplete.)