Error when building GDAL against unixODBC

Normand Savard <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <[email protected]>
I tried to compile GDAL 1.6.0 against unixODBC 2.2.14 and the following 
errors appears:

sqltypes.h:400: error: ISO C++ forbids declaration of ‘SQLBIGINT’ with 
no type
sqltypes.h:403: error: ISO C++ forbids declaration of ‘SQLUBIGINT’ with 
no type


This error happens because ODBCINT64 is defined to a none value within
unixodbc_conf.h. The relevant lines of code in sqltypes.h are:

#ifdef ODBCINT64
typedef ODBCINT64 SQLBIGINT;
#endif
#ifdef UODBCINT64
typedef UODBCINT64 SQLUBIGINT;
#endif

The code in unixodbc_conf.h is:

#ifndef ODBCINT64
#define ODBCINT64
#endif
#ifndef UODBCINT64
#define UODBCINT64
#endif

The compilation switches are:
?g++ -g -O2 -fPIC -Wall -DOGR_ENABLED 
-I/home/fgs/fgs-dev/src/gdal-1.6.0/port
-I/home/fgs/fgs-dev/built/unixODBC 
-I/home/fgs/fgs-dev/built/unixODBC/include
-I/home/fgs/fgs-dev/built/jpeg -I/home/fgs/fgs-dev/built/jpeg/include
-I/home/fgs/fgs-dev/built/libgeotiff/include 
-I/home/fgs/fgs-dev/built/tiff/include
-I/home/fgs/fgs-dev/built/libpng -I/home/fgs/fgs-dev/built/libpng/include
-I/home/fgs/fgs-dev/built/curl/include -I../frmts/zlib -DHAVE_CURL 
-DHAVE_LIBZ
-c -o cpl_odbc.o cpl_odbc.cpp

I built unixODBC without a problem. I'm sure that there are good reasons to
define these constants within unixodbc_conf.h. Nevertheless do you have 
a suggestion
to solve this issue?

Norm
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.