views:

81

answers:

1

I am trying to compile an 32 bit application. I am aware of problems with it but that is why its being compiled on 64 bit version.

I am hanging at this problem. Application uses lots of sql stuff.

In sqltypes.h file: (provided by MDAC)

#ifdef _WIN64
typedef INT64           SQLLEN;
typedef UINT64        SQLULEN;
typedef UINT64  SQLSETPOSIROW;
#else
  #define SQLLEN          SQLINTEGER
  #define SQLULEN         SQLUINTEGER
  #define SQLSETPOSIROW   SQLUSMALLINT
#endif
//For Backward compatibility
#ifdef WIN32
  typedef SQLULEN           SQLROWCOUNT;
  typedef SQLULEN           SQLROWSETSIZE;
  typedef SQLULEN           SQLTRANSID;
  typedef SQLLEN            SQLROWOFFSET;
#endif

For some reason when its compiled on 32 bit platform it works great But when I try building it on 64 it goes berserk.

Error 61 error C2146: syntax error : missing ';' before identifier 'SQLLEN' ..\external\microsoft sdk\include\sqltypes.h 50

It does not recognize INT64, UINT64.

Is there something I need to enable so it will work under 64 build process? Missing some #include or #define?

Any help would be great

Thanks

A: 

It turned out the problem was that somehow BaseTsd.h was not included (can't believe this is possible)

but as short fix I just included BaseTsd.h manually... i will comment on this answer if i find better solution

grobartn