[DB-SIG] Solid and mxODBC?

M.-A. Lemburg mal@lemburg.com
Tue, 25 May 1999 14:49:18 +0200


Petr Snajdr wrote:
> 
> Helo,
>  has anyone tried to compile the mxODBC  for Solid/Linux?
> 
> unzip mxODBC-1.1.0.zip
> cd ODBC/solid
> make -f Makefile.pre.in boot
> emacs Setup
> emacs Makefile (Add: -I/usr/local/solid/include)
> make
> 
> [...]
> 
> gcc -fpic  -DMAL_DEBUG -DDONT_HAVE_SQLTablePrivileges
> -DDONT_HAVE_SQLColumnPrivileges -DDONT_HAVE_SQLForeignKeys
> -DDONT_HAVE_SQLProcedures -DDONT_HAVE_SQLProcedureColumns -DSolidServer
> -I/home/solid/include -g -O2 -I/usr/local/include/python1.5
> -I/usr/local/include/python1.5 -I/usr/local/solid/include -DHAVE_CONFIG_H
> -c ./mxSQLCodes.c
> gcc -fpic  -DMAL_DEBUG -DDONT_HAVE_SQLTablePrivileges
> -DDONT_HAVE_SQLColumnPrivileges -DDONT_HAVE_SQLForeignKeys
> -DDONT_HAVE_SQLProcedures -DDONT_HAVE_SQLProcedureColumns -DSolidServer
> -I/home/solid/include -g -O2 -I/usr/local/include/python1.5
> -I/usr/local/include/python1.5 -I/usr/local/solid/include -DHAVE_CONFIG_H
> -c ./mxODBC.c
> ./mxODBC.c: In function `mxODBCursor_BindInputParameter':
> ./mxODBC.c:2519: `SQL_TYPE_NULL' undeclared (first use this function)
> ./mxODBC.c:2519: (Each undeclared identifier is reported only once
> ./mxODBC.c:2519: for each function it appears in.)
> ./mxODBC.c: In function `mxODBCursor_Execute':
> ./mxODBC.c:3091: `SQL_TYPE_NULL' undeclared (first use this function)
> make: *** [mxODBC.o] Error 1
> 
> Anyone have a better version? Replacement? Help?

The next version will have a fix. Until then, simply add a
define to mxODBC.c:

/* Some drivers don't define this value (even though its standard ODBC
   2.0), e.g. Solid is one that doesn't. Since we use it in the
   binding code below, we simply redefine it to its standard value
   taken from WINDOWS.H. */
#ifndef SQL_TYPE_NULL
# define SQL_TYPE_NULL	0
#endif

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                   220 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/