etup compilation in a Ch command shell based on the instruction
in sectoin 1.1 in Ch SDK User's Guide at CHHOME/docs/chsdk.pdf

In Unix, 
building libfunc.a and dynamically loaded lib "libsample.dl"
   make -f Makefile

In Windows,
Building func.lib and func.dll, and dynamically loaded lib "libsample.dl"
   nmake -f Makefile.win

Execute Ch program and functions in Ch command shell interactively as shown below

> program.c
sin(3) = 0.141120
hypot(3,4) = 5.000000
func1(3) = 0.282240
func2(3,4) = 10.000000
> func1(5)
-1.9178 
> func2(3,4)
10.0000 

To call your functions under any directories in Ch shell, you can
follow the instructions below:
1) place header file sample.h in a directory specified by _ipath,
2) place function files func1.chf and func2.chf in a directory
   specified by _fpath
3) place dynamically loaded library libsample.dl in a directory
  specified by _lpath
4) under Windows, if you have any *.DLL files, place them
   in a directory specified by _path.
   Under unix, if you have any *.so files and they are not located in
   /usr/lib or /usr/local/lib, place them in a directory specified by
   environment variable LD_LIBRARY_PATH or similar one in your operating
system.

You can check more details in Ch users's guide about how to set up
these paths in configuraiton file .chrc (in unix) or _chrc (in windows).
