[freetds] RETCODE conflict

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Wed Mar 30 01:39:50 EST 2005


> 
> Has any else run into a typedef conflict running FreeTDS with 
> unixODBC 
> and trying to include both FreeTDS's sqldb.h (which includes sybdb.h) 
> and unixODBC's sqltypes.h?  sqltypes.h defines RETCODE as a signed 
> short.  sybdb.h defines RETCODE as an int.  Any suggested 
> work arounds?
> 
> Frederick N. Brier
> Multideck Corporation
> 

Both use typedefs (windows too).

A possible solution can be 

#include <sql.h>
#define RETCODE DBRETCODE
#include <sybdb.h>
#undef RETCODE

DBRETCODE ret; // dblib return code
RETCODE rc;    // ODBC return code

However I don't find the reason to include both dblib and ODBC...

freddy77



More information about the FreeTDS mailing list