> > > Tommie, > > Yes, I had exactly the same problem. The problem seems to be > with the cygwin header files rather than DBD::ODBC (hence the > cross-post to the cygwin list). > > sql.h includes the file sqltypes.h - there seem to be two > files with this name, one in /usr/include and one in > /usr/include/w32api. The compiler is picking up the former > whereas the correct file is the latter one. (The first file > relates to something called ECPG and has nothing to do with ODBC.). > > The solution I adopted is to rename /usr/include/sqltypes.h > to sqltypes.h.bad and recompile.
It would be great if someone can come up with a tested patch that allows Makefile.PL to work around this (possibly by forcing a #include to <w32api/sqltypes.h> via dbdodbc.h (which is one reason why dbdodbc.h is generated by Makefile.PL) if you detect you are using cygwin under Win32 and the /usr/include/sqltypes.h is "bad"). Thanks Jeff > > Cheers, > > David Claughton. > > -----Original Message----- > From: Jones, Tommie [mailto:[EMAIL PROTECTED] > Sent: 15 January 2004 13:32 > To: [EMAIL PROTECTED] > Subject: Cygwin/DBD::ODBC issue > > > Trying to build DBD::ODBC. Failing at make. > Its having some trouble compiling the header files. > > Below is a log. Anyone have any suggestions? > > > > > $ perl Makefile.PL > Configuring DBD::ODBC ... > >>> Remember to actually *READ* the README file! > And re-read it if you have any problems. > Using DBI 1.40 (for perl 5.006001 on cygwin-multi) installed > in /usr/lib/perl5/s ite_perl/5.6.1/cygwin-multi/auto/DBI > Using ODBC in C:/WINNT > Umm, this looks like a Microsoft ODBC type of driver manager. > Building for Microsoft under Cygwin Injecting selected odbc > driver into cc command Using DBI 1.40 (for perl 5.006001 on > cygwin-multi) installed in /usr/lib/perl5/s > ite_perl/5.6.1/cygwin-multi/auto/DBI > Writing Makefile for DBD::ODBC > The DBD::ODBC tests will use these values for the database connection: > DBI_DSN= e.g. dbi:ODBC:demo > DBI_USER= > DBI_PASS= > Warning: not all required environment variables are set. > > > $make > /bin/sh -c true > /bin/sh -c true > gcc -c -I. -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI > -I/usr/includ > e -I/usr/include/w32api -DPERL_USE_SAFE_PUTENV > -fno-strict-aliasing -I/usr/local > /include -DUSEIMPORTLIB -O2 -DVERSION=\"1.06\" -DXS_VERSION=\"1.06\" > -I/usr/l > ib/perl5/5.6.1/cygwin-multi/CORE ODBC.c > > In file included from dbdodbc.h:7, > > from ODBC.h:9, > > from ODBC.xs:1: > > /usr/include/w32api/sql.h:343: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:343: error: syntax error before '*' token > > /usr/include/w32api/sql.h:344: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:344: error: syntax error before '*' token > > /usr/include/w32api/sql.h:345: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:345: error: syntax error before '*' token > > /usr/include/w32api/sql.h:346: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:346: error: syntax error before '*' token > > /usr/include/w32api/sql.h:347: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:348: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:348: error: syntax error before '*' token > > /usr/include/w32api/sql.h:349: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:349: error: syntax error before '*' token > > /usr/include/w32api/sql.h:350: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:351: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:351: error: syntax error before '*' token > > /usr/include/w32api/sql.h:352: error: syntax error before "SQL_API" > > /usr/include/w32api/sql.h:352: error: syntax error before '*' token > > /usr/include/w32api/sql.h:353: error: syntax error before "SQL_API" > > AND MORE OF THE SAME > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ > > This e-mail may contain information that is privileged, > confidential or otherwise protected from disclosure. It must > not be used by, or its > contents copied or disclosed to, persons other than the intended > recipient. However, the contents of this e-mail may be intercepted, > monitored or recorded by Insurance Technology Solutions Limited for > the purposes of ensuring compliance with its policies and procedures. > Any liability (in negligence or otherwise) arising from any > third party acting, or refraining from acting, on any > information contained in this e-mail is excluded. > > Any views expressed in this message are those of the > individual sender and do not necessarily represent the views > of Insurance Technology Solutions Limited. > > If you have received this e-mail in error please notify the > originator of the message. > > Scanning of this message and addition of this footer is > performed by SurfControl E-mail Filter software in conjunction with > virus detection software. > >
