• Notes for Linux.
    1. To compile the Database Template Library you will need gcc 3.0 or gcc 2.96-85 (with patch). You will not be able to compile under gcc 2.95 or gcc 2.96-54 as these versions do not support some C++ standard features that our code requires such as stringstreams.
    2. If you compile with gcc 2.96-85 you will get an error message like "basstring.h line 343 cannot convert from const char * to const BYTE * in c_str() return". The problem is that 2.96-85 has a bug in basic_string::c_str(). Our recommended fix here is to upgrade to gcc 3.0 where the problem has been fixed. Failing that, it is relatively easy to patch the library, the routine has a statement return "";. Simply change this to return (CharT *)"";
    3. The MySQL ODBC driver version 2.50.36-1 on Linux does not work correctly with SQLPrepare(). Current workaround involves calling SQLExecDirect() rather than SQLPrepare(). To compile with this workaround define the symbol MYODBC_BUG as described in the makefile. (Another alternative is to download the source for MyODBC and re-compile. On the test machine we used this also seemed to fix the problem.)
    4. MySQL 3.23.33 does not support COMMIT or ROLLBACK. Therefore the "range transaction" examples will not work under this version of MySQL.
    5. When you run the executable for the first time under unixODBC you may get a message like "error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory". The problem in this case is not having your environment variables set up correctly for unixODBC.

      From: "Nick Gorham" <nick@lurcher.org>
      To: <cjoy@houston.rr.com>
      Subject: unixODBC


      > Hi,
      >
      > Your problem is not finding the lib at compile time, but at run time,
      > either add /usr/local/lib to LD_LIBRARY_PATH
      >
      > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
      > export LD_LIBRARY_PATH
      >
      > (the above assumes linux, if some other OS, it's much the same, mail me
      > if you can't find the variable)
      >
      > Or in linux, as root you can add /usr/local/lib to /etc/ld.so.conf, and
      > then run ldconfig (often in /sbin/ldconfig), to add it to all users lib
      > search paths.

  • 1