  Libodbc++ Installation
  Manush Dodunekov <manush@stendahls.net>
  Version 0.2.2, 2000-01-25

  This tries to explain the installation procedure for libodbc++
  ______________________________________________________________________

  Table of Contents


  1. Software requirements

     1.1 C++ compiler
     1.2 ODBC Driver Manager
     1.3 Drivers
     1.4 QT library (optional)

  2. Installation

     2.1 UNIX
        2.1.1 Configuration
        2.1.2 Compilation
        2.1.3 Installing libodbc++
     2.2 Win32


  ______________________________________________________________________

  1.  Software requirements


  1.1.  C++ compiler

  To compile libodbc++, you'll need a c++ compiler that supports
  exceptions, templates and namespaces and has a reasonable standard c++
  library. On free unices, your best choice is GCC 2.95.2 or later,
  which can be obtained from the GCC homepage <http://gcc.gnu.org/>.  If
  you already have egcs 1.1.2 or later, it will do.

  On windows, success has been reported with MSVC 5.0 and 6.0, with and
  without QT.


  1.2.  ODBC Driver Manager

  The ODBC Driver Manager is the software layer between applications and
  ODBC drivers. You must have one installed in order to use this
  library. The free choices on UNIX are:

  o  unixODBC <http://www.unixodbc.org/>. Version 1.8.4 or later is
     recommended.

  o  iODBC <http://www.iodbc.org/>. Version 2.50.3 or later is
     recommended.


  1.3.  Drivers

  To actually use libodbc++, you will need one or more ODBC drivers.
  Examples of free database engines with ODBC drivers are:

  o  MySQL <http://www.mysql.com/>

  o  PostgreSQL <http://www.postgresql.org/>


  MyODBC (the MySQL ODBC driver version 2.50.23 or later is known to
  work fine with both iODBC and libodbc++).

  If you can't find an ODBC driver for the RDBMS you need to access, you
  can probably buy a solution from Openlink Software
  <http://www.openlinksw.com/> or Merant <http://www.merant.com/>.



  1.4.  QT library (optional)

  If you wish to compile a version of the library that uses QT-specific
  strings and streams instead of the standard ones, you will need
  version 2.0 or later of QT (2.0.2 is recommended), which can be
  obtained at the Troll Tech home page <http://www.troll.no/>.


  2.  Installation

  2.1.  UNIX

  The following information applies for installing libodbc++ on unices.


  2.1.1.  Configuration

  First, you need to configure libodbc++ for your system.  Go into the
  source directory and do



       $ ./configure




  or, if iODBC isn't installed in it's default location /usr/local, do



       $ ./configure --with-iodbc=DIR




  This will make ./configure look for iODBC in DIR/include/ and
  DIR/lib/.

  If you aren't using iODBC, try



       $ ./configure --with-odbc=DIR




  Works the same as above, except it looks for standard ODBC headers and
  libraries instead of the iODBC ones. This should be used with for
  example unixODBC and Intersolv.

  If you wish to install libodbc++ in a location other than /usr/local,
  add --prefix=PREFIX to the ./configure arguments.

  If the c++ compiler you wish to use to compile this package isn't the
  system default one, you will need to set the environment variable CXX
  to the name of it's executable. For example, if you have an old gcc or
  egcs as a system default compiler, but installed a newer gcc with
  prefix /usr/local/gcc, do like this:



       $ CXX=/usr/local/gcc/bin/c++ ./configure --with-iodbc




  If you wish to enable support for multithreaded programs, add
  --enable-threads to the ./configure arguments.  This requires a POSIX
  compliant pthreads implementation on UNIX.

  If you wish to enable support for QT, use the --with-qt argument. You
  can optionally specify where your QT lives by using --with-
  qt=/path/to/qt. The --with-qt-includes, --with-qt-libs and --with-moc
  options might be handy if you have a strange QT installation. This
  will compile a second version of the library named libodbc++_qt in the
  subdirectory qt.  Note that you must #define ODBCXX_QT when compiling
  a program that links with libodbc++_qt.

  You can control the ODBC version libodbc++ uses by specifying: --with-
  odbc-version=ODBCVER, where ODBCVER should be a four-digit hexadecimal
  value. For example 0x0250 means ODBC 2.50.


  2.1.2.  Compilation

  Just type



       $ make




  If it all goes well, you can try a couple of the test programs in
  tests/. You'll need to configure some datasources before running most
  of the tests. For simply reality-checking your current ODBC setup, you
  can try running tests/dmtest, which lists all available datasources
  and drivers.


  2.1.3.  Installing libodbc++

  If you have write privileges in PREFIX, just do



       $ make install




  Otherwise, you'll have to use



       $ su root -c 'make install'




  If you are using linux, now is a good time to run



       $ su root -c '/sbin/ldconfig'




  to update your dynamic linker's cache.


  2.2.  Win32

  A makefile for win32 is provided in the win32 directory of the source
  distribution. Use


       nmake /f makefile.w32 CFG=<config>




  where <config> is one of:

  o  debug-lib - Static library with debugging information. Builds
     odbc++sd.lib in the debug-lib subdirectory.

  o  debug-dll - Shared library with debugging information. Builds
     odbc++d.lib and odbc++d.dll in the debug-dll subdirectory.

  o  prod-lib - Production static library. Builds odbc++s.lib in the
     prod-lib subdirectory.

  o  prod-dll - Production shared library. Builds odbc++.lib and
     odbc++.dll in the prod-dll subdirectory.

  o  qt-debug-lib - Static library with QT and debugging information.
     Builds odbc++qtsd.lib in the qt-debug-lib subdirectory.

  o  qt-debug-dll - Shared library with QT and debugging information.
     Builds odbc++qtd.lib and odbc++qtd.dll in the qt-debug-dll
     subdirectory.

  o  qt-prod-lib - Production static library with QT. Builds
     odbc++qts.lib in the qt-prod-lib subdirectory.

  o  qt-prod-dll - Production shared library with QT. Builds
     odbc++qt.lib and odbc++qt.dll in the qt-prod-dll subdirectory.

  When bulding with QT, make sure you have your environment set up
  right. QTDIR must point to a directory that contains the include and
  lib subdirectories for QT. The makefile will assume version 202
  (2.0.2) of QT. To override that, pass QT_VERSION=nnn to nmake, for
  example:



       nmake /f makefile.w32 CFG=qt-debug-dll QT_VERSION=201




  will build libodbc++ against version 2.0.1 of QT.


  Note that when compiling an application against libodbc++ compiled as
  a DLL, you have to define the macro ODBCXX_DLL before including any
  library header files.

  A makefile for compiling the tests can be found in the win32/tests
  subdirectory. Build the debug-lib version of the library, and use


       nmake /f makefile.w32




  to build them.




















































