This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: building Perl module DBD-ODBC-4.3 under 64-bit cygwin
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 1 Aug 2013 16:02:28 +0200
- Subject: Re: building Perl module DBD-ODBC-4.3 under 64-bit cygwin
- References: <3BA6644C396CE44F83F988D688C72A73015956B7EE at NL0230MBX08N1 dot DIR dot slb dot com>
- Reply-to: cygwin at cygwin dot com
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:
http://cygwin.com/faq/faq.html#faq.programming.64bitporting
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
...is 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;
#else
typedef unsigned long ULONG;
#endif
HTH,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple