|
DataReel Shared Library Kit |
Overview
Environment Files
Makefile Templates
Setting A Shared Library Path
Building With GCC
Building With HPUX C++
Building With SUN C++
The DataReel shared library kit is supplied as an additional component to the open-source library. The shared library kit includes all the necessary source code and makefiles to build shared libraries for all the currently supported UNIX platforms. Shared libraries allow executables to link to the library at run-time. Static linking is a process that links the library and executable together forming a standalone executable. Using a shared library results in smaller executables and allows you to modify the library without re-compiling the executables. The primary disadvantages of using a shared library are the increased executable startup times and the executable dependency issues that complicate binary distributions. Static and dynamic libraries speed up compile times considerably and allow you organize and manage large projects more efficiently.
Pre-compiled shared libraries are available from glNET Software. Additionally glNET Software provides custom-built shared libraries, WIN32 dynamic link libraries, and UNIX static libraries. For more information about obtaining the DataReel shared library kit or pre-compiled shared libraries please contact:
glNET Software
P.O. Box 820314
South Florida, FL. 33082-0314
FAX: 413-622-7705
glnet@glnetsoftware.com
http://www.glnetsoftware.com
The DataReel shared library kit is distributed as a compressed tar or gziped tar archive and should be installed in the "dlib" subdirectory of the source code distribution. Each supported UNIX compiler has a ".env" file located in the DataReel dlib directory. Environment files are makefiles used to set all configurable path, compiler, and linker parameters. The environment files included with the shared library kit do not require any modification to build a shared library. By modifying one of the following files you can build custom versions of the default libraries.
hpux10.env - HPCPLUSPLUS A.10.27 hpux11.env - HP aC++ B3910B A.03.30 linux.env - gcc version 2.96 20000731 (Red Hat Linux 7.0) solaris.env - Sun WorkShop C++ 5.0 (4.2 compatibility mode)
A makefile template file is supplied for each supported UNIX compiler. Makefile templates are located in the DataReel dlib directory and are used to build applications using the DataReel shared libraries with compiler and linker options set in the compiler's ".env" file. Before using a template file you must set the absolute path to the DataReel library in the template file $(GCODE_LIB_DIR) variarable:
# Setup my path to the gxcode library GCODE_LIB_DIR = #--> Set the absolute path here
The following is a list of makefile templates included with the source code distribution:
template.h10 - HPCPLUSPLUS A.10.27 template.h11 - HP aC++ B3910B A.03.30 template.gcc - gcc version 2.96 20000731 (Red Hat Linux 7.0) template.sol - Sun WorkShop C++ 5.0 (4.2 compatibility mode)
To use a makefile template copy the template to the project directory and set the absolute path:
cp /usr/local/datareel/dreel410/dlib/template.gcc /usr/local/datareel/dreel410/examples.db/simple/Makefile vi /usr/local/datareel/dreel410/examples.db/simple/Makefile # Setup my path to the gxcode library GCODE_LIB_DIR = /usr/local/datareel/dreel410
Use the make utility to build the project executable:
cd /usr/local/datareel/dreel410/examples.db/simple make
echo $LD_LIBRARY_PATH
If the LD_LIBRARY_PATH variable is not set execute one of the following commands depending on which shell you are using:
/bin/csh setenv LD_LIBRARY_PATH /usr/local/datareel/dreel410/dlib /bin/sh LD_LIBRARY_PATH=/usr/local/datareel/dreel410/dlib export LD_LIBRARY_PATH
If the LD_LIBRARY_PATH variable is set execute one of the following commands depending on which shell you are using:
/bin/csh setenv LD_LIBRARY_PATH /usr/local/datareel/dreel410/dlib:${LD_LIBRARY_PATH} /bin/sh LD_LIBRARY_PATH=/usr/local/datareel/dreel410/dlib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
The RedHat shared libraries have been built and tested using:
gcc version 2.96 20000731 Red Hat Linux 7.0
There are two files used to build the RedHat shared libraries and a gcc template file used to generate application makefiles. All configurable parameters are contained in the linux.env include file located in the DataReel dlib directory. When building shared libraries within a Linux IDE please refer to the linux.env $(DEFMACS) variable for the required and optional preprocessor directives.
To build the 32-bit shared library execute the following commands. NOTE: This example is using an arbitrary DataReel install directory.
% cd /usr/local/datareel/dreel410/dlib make -f linux.mak make -f linux.mak clean
This will generate the "libgxcode.so.4.1" shared library. The libgxcode.so.4.1 file must be symbolically linked or renamed to libgxcode.so before using the shared library.
To build the 64-bit shared library under Linux you must enable the 64-bit preprocessor directives in the linux.env $(64BIT_DEFMACS) variable and set the 64-bit project name in the linux.mak $(PROJECT) variable.
% cd /usr/local/datareel/dreel410/dlib make -f linux.mak make -f linux.mak clean
This will generate the "libgxcode64.so.4.1" shared library. The libgxcode64.so.4.1 file must be symbolically linked or renamed to libgxcode64.so before using the shared library. NOTE: When using the gcc makefile template you must enable the 64-bit library $(LIBRARIES) variable.
The HPUX shared libraries have been built and tested using:
HPUX 10.20 Native C++ Compiler - HP C++ HPCPLUSPLUS A.10.27 HPUX 11.0 Native C++ Compiler - HP aC++ B3910B A.03.30 HP aC++ B3910B A.03.27 Language Support Library
There are four files used to build the HPUX shared libraries and two template files used to generate application makefiles. All configurable parameters are contained in the hpux10.env and hpux11.env include files located in the DataReel dlib directory. When building shared libraries within a HPUX IDE please refer to the hpux10.env or hpux11.env $(DEFMACS) variable for the required and optional preprocessor directives.
To build the 32-bit shared library using the HPUX 10.20 C++ front-end compiler execute the following commands. NOTE: HPUX 10.20 builds require the DCE thread library if any multithreaded components are selected in the hpux10.mak makefile. This example is using an arbitrary DataReel install directory.
% cd /opt/datareel/dreel410/dlib make -f hpux10.mak make -f hpux10.mak clean
To build the 32-bit shared library using the HPUX 11.0 aCC C++ compiler execute the following commands. NOTE: This example is using an arbitrary DataReel install directory.
% cd /opt/datareel/dreel410/dlib make -f hpux11.mak make -f hpux11.mak clean
This will generate the "libgxcode.sl.4.1" shared library. The libgxcode.sl.4.1 file must be symbolically linked or renamed to libgxcode.sl before using the shared library.
To build the 64-bit shared library under HPUX 11.0 you must enable the 64-bit preprocessor directives in the hpux11.env $(64BIT_DEFMACS) variable and set the 64-bit project name in the hpux11.mak $(PROJECT) variable. NOTE: There is no 64-bit support for HPUX 10.20.
% cd /opt/datareel/dreel410/dlib make -f hpux11.mak make -f hpux11.mak clean
This will generate the "libgxcode64.sl.4.1 " shared library. The libgxcode64.sl.4.1 file must be symbolically linked or renamed to libgxcode64.sl before using the shared library. NOTE: When using the HPUX makefile template you must enable the 64-bit library $(LIBRARIES) variable.
The Solaris shared libraries have been built and tested using:
Sun WorkShop C++ 5.0 in 4.2 compatibility mode Solaris 2.7 Solaris 2.8
There are two files used to build the Solaris shared libraries and a Solaris template file used to generate application makefiles. All configurable parameters are contained in the solaris.env include file located in the DataReel dlib directory. When building shared libraries within a Solaris IDE please refer to the solaris.env $(DEFMACS) variable for the required and optional preprocessor directives.
To build the 32-bit shared library execute the following commands. NOTE: This example is using an arbitrary DataReel install directory.
% cd /opt/datareel/dreel410/lib make -f solaris.mak make -f solaris.mak clean
This will generate the "libgxcode.so.4.1" shared library. The libgxcode.so.4.1 file must be symbolically linked or renamed to libgxcode.so before using the shared library.
To build the 64-bit shared library under Solaris you must enable the 64-bit preprocessor directives in the Solaris.env $(64BIT_DEFMACS) variable and set the 64-bit project name in the Solaris.mak $(PROJECT) variable.
% cd /opt/datareel/dreel410/lib make -f solaris.mak make -f solaris.mak clean
This will generate the "libgxcode64.so.4.1" shared library. The libgxcode64.so.4.1 file must be symbolically linked or renamed to libgxcode64.so before using the shared library. NOTE: When using the Solaris makefile template you must enable the 64-bit library $(LIBRARIES) variable.