The sample programs and the build procedures to build them are installed in the C:\SYBASE\SAMPLE\MONCLT\TESTMON and C:\SYBASE\SAMPLE\MONCLT\TESTHIST directories.
For each of the sample programs, there is a project (.mak) file. For applications to be built using Microsoft Visual C/C++ version 4.0 and to be run under Windows NT or Windows 95 as a console application, the two project files are TESTMO32.MAK and TESTHI32.MAK.
To build and run the sample programs, use the following steps:
Modify the PATH environment variable to include the C:\SYBASE\DLL directory in which the Sybase DLLs were installed.
If you have not already done so, set the SYBASE environment variable to the Sybase \SYBASE root installation directory.
If you do not have the appropriate server names in the sql.ini file, add the entries for the Adaptive Server installation, Monitor Server, and Historical Server that you intend to use to the C:\SYBASE\INI\SQL.INI file.
Edit the \SYBASE\SAMPLE\MONCLT\TESTMON\ EXAMPLE.H and \SYBASE\SAMPLE\MONCLT\TESTHIST\ EXAMPLE.H files to supply the names of the Adaptive Server, Monitor Server, Historical Server (for TESTHIST only), login name on Adaptive Server, and password.
Open the project (.mak) file for the sample application you want to build.
To use the program that tests a live connection to Monitor Server, enter:
To use the program that tests Historical Server, enter:
If the Monitor Client Library is installed in a directory other than \SYBASE:
Modify the compiler preprocessor option to include the INCLUDE subdirectory of the installation directory, instead of the default \SYBASE\INCLUDE directory, in the list of directories in which the C compiler preprocessor looks for header files.
Edit the list of libraries for the linker to use for the application so that it specifies the full path name of the library, instead of the \SYBASE\LIB\SMCAPI32.LIB default directory path name.
Build the project.
Run the application.
To run applications under Windows NT or Windows 95, enter the name of the executable program from a Command Prompt window. For example: