Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting type ULONG on Cygwin x64 #18

Open
nowox opened this issue Jan 16, 2017 · 0 comments
Open

Conflicting type ULONG on Cygwin x64 #18

nowox opened this issue Jan 16, 2017 · 0 comments
Assignees

Comments

@nowox
Copy link

nowox commented Jan 16, 2017

While compiling PyODBC on Cygwin 2.1 x64 I get this issue:

In file included from /usr/include/sql.h:89:0,
                 from src/pyodbc.h:53,
                 from src/buffer.cpp:12:
/usr/include/sqltypes.h:220:24: error: conflicting declaration ‘typedef long unsigned int ULONG’
 typedef unsigned long  ULONG;
                        ^
In file included from /usr/include/w32api/combaseapi.h:153:0,
                 from /usr/include/w32api/objbase.h:14,
                 from /usr/include/w32api/ole2.h:17,
                 from /usr/include/w32api/wtypes.h:12,
                 from /usr/include/w32api/winscard.h:10,
                 from /usr/include/w32api/windows.h:97,
                 from src/pyodbc.h:50,
                 from src/buffer.cpp:12:
/usr/include/w32api/wtypesbase.h:92:15: note: previous declaration as ‘typedef unsigned int ULONG’
 typedef DWORD ULONG;
               ^
error: command 'gcc' failed with exit status 1

According to Cygwin mailing list (here, a possible solution (that eventually allow me to build pyodbc) is this one:

#ifdef __LP64__
  typedef unsigned int ULONG;
#else
  typedef unsigned long ULONG;
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants