building Perl module DBD-ODBC-4.3 under 64-bit cygwin

Corinna Vinschen
Thu Aug 1 14:02:00 GMT 2013

On Aug  1 12:57, Simon Barnes wrote:
> I'm having difficulty with this and would appreciate any suggestions.   It does build under 32-bit cygwin.

That's a good place to point to my extended "how to port to 64 bit" FAQ,
starting here:

Please read this first.

Basically, what you see here...

> /usr/local/include/sqltypes.h:261:33: error: conflicting types for 'ULONG'
>  typedef unsigned long           ULONG;
>                                  ^
> In file included from /usr/include/w32api/windows.h:69:0,
>                  from dbdodbc.h:6,
>                  from ODBC.h:8,
>                  from ODBC.xs:1:
> /usr/include/w32api/windef.h:25:27: note: previous declaration of 'ULONG' was here
>  typedef unsigned __LONG32 ULONG;
>                            ^
> Makefile:390: recipe for target `ODBC.o' failed a typical type conflict.  ULONG is a Windows type defined as
unsigned long in the Win32 API.  The Win32 data model is LLP64, so
unsigned long is 4 bytes.  However, Cygwin is LP64, so unsigned long is
8 bytes.  Therefore the `typedef unsigned long ULONG;' is wrong for 64
bit.  Either drop the definition entirely, or redefine it matching the
data model:

  #ifdef __LP64__
  typedef unsigned int ULONG;
  typedef unsigned long ULONG;


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list