I am trying install perl DBD-DB2 driver on cygwin running on Windows NT. I installed DBI module successfully. But having errors installing DBD-DB2 module.
My Operating System: Windows NT 4.0 Database: IBM DB2 7.0 1. While generating makefile, there is a warning regarding no library found -ldb2. 2. In SQLLIB\lib db2api.lib and db2cli.lib are found. How GNU gcc comilper links with IBM db2api.lib and db2cli.lib files? 3. make is failing to generate dll file. Please help me out to install perl DBD-DB2 driver on cygwin. $ perl Makefile.PL Configuring DBD::DB2... Remember to actually read the README and CAVEATS files! Using DB2 in "D:\Programs\SQLLIB" System: perl5.006001 DBI1.20 cygwin_nt-4.0 loreley 1.3.2(0.3932) 2001-05-20 23:28 i686 unknown cygwin-multi dl_dlopen.xs Compiler: gcc -O2 -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include Includes: -I"D:\Programs\SQLLIB/include" -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI Libraries: -LD:\Programs\SQLLIB/lib -ldb2 Checking if your kit is complete... Looks good Warning: -LD:\Programs\SQLLIB/lib changed to -L/DBD-DB2-0.76/D:\Programs\SQLLIB/lib Note (probably harmless): No library found for -ldb2 Checking if your kit is complete... Looks good Writing Makefile for DBD::DB2::Constants Writing Makefile for DBD::DB2 $ make cp DB2.pod blib/lib/DBD/DB2.pod cp lib/Bundle/DBD/DB2.pm blib/lib/Bundle/DBD/DB2.pm cp DB2.pm blib/lib/DBD/DB2.pm make[1]: Entering directory `/DBD-DB2-0.76/Constants' cp Constants.pm ../blib/lib/DBD/DB2/Constants.pm AutoSplitting ../blib/lib/DBD/DB2/Constants.pm (../blib/lib/auto/DBD/DB2/Constants) /usr/bin/perl -I/usr/lib/perl5/5.6.1/cygwin-multi -I/usr/lib/perl5/5.6.1 /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap / usr/lib/perl5/5.6.1/ExtUtils/typemap Constants.xs > Constants.xsc && mv Constants.xsc Constants.c gcc -c -I"D:\Programs\SQLLIB/include" -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\" -I/usr/lib/perl5/5.6.1/cygwin-multi/CORE Constants.c In file included from Constants.xs:16: D:/Programs/SQLLIB/include/sqlcli.h:311: warning: redefinition of `UCHAR' /usr/include/w32api/winnt.h:49: warning: `UCHAR' previously declared here D:/Programs/SQLLIB/include/sqlcli.h:312: warning: redefinition of `ULONG' /usr/include/w32api/winnt.h:51: warning: `ULONG' previously declared here D:/Programs/SQLLIB/include/sqlcli.h:313: warning: redefinition of `USHORT' /usr/include/w32api/winnt.h:50: warning: `USHORT' previously declared here Running Mkbootstrap for DBD::DB2::Constants () chmod 644 Constants.bs rm -f ../blib/arch/auto/DBD/DB2/Constants/Constants.dll LD_RUN_PATH="" ld2 -s -L/usr/local/lib Constants.o -o ../blib/arch/auto/DBD/DB2/Constants/Constants.dll /usr/lib/perl5 /5.6.1/cygwin-multi/CORE/libperl5_6_1.a dllwrap --dllname Constants.dll --driver-name gcc --dlltool dlltool --export-all-symbols --as as --output-def libConstant s.def --output-lib libConstants.a \ -s -L/usr/local/lib Constants.o /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6_1.a dllwrap: no export definition file provided dllwrap: creating one, but that may not be what you want mv Constants.dll libConstants.a ../blib/arch/auto/DBD/DB2/Constants/ chmod 755 ../blib/arch/auto/DBD/DB2/Constants/Constants.dll cp Constants.bs ../blib/arch/auto/DBD/DB2/Constants/Constants.bs chmod 644 ../blib/arch/auto/DBD/DB2/Constants/Constants.bs make[1]: Leaving directory `/DBD-DB2-0.76/Constants' /usr/bin/perl -I/usr/lib/perl5/5.6.1/cygwin-multi -I/usr/lib/perl5/5.6.1 /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap / usr/lib/perl5/5.6.1/ExtUtils/typemap DB2.xs > DB2.xsc && mv DB2.xsc DB2.c gcc -c -I"D:\Programs\SQLLIB/include" -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI -DPERL_USE_SAFE_PUTENV -fno- strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"0.76\" -DXS_VERSION=\"0.76\" -I/usr/lib/perl5/5.6. 1/cygwin-multi/CORE DB2.c In file included from DB2.h:9, from DB2.xs:7: D:/Programs/SQLLIB/include/sqlcli.h:311: warning: redefinition of `UCHAR' /usr/include/w32api/winnt.h:49: warning: `UCHAR' previously declared here D:/Programs/SQLLIB/include/sqlcli.h:312: warning: redefinition of `ULONG' /usr/include/w32api/winnt.h:51: warning: `ULONG' previously declared here D:/Programs/SQLLIB/include/sqlcli.h:313: warning: redefinition of `USHORT' /usr/include/w32api/winnt.h:50: warning: `USHORT' previously declared here gcc -c -I"D:\Programs\SQLLIB/include" -I/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/DBI -DPERL_USE_SAFE_PUTENV -fno- strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O2 -DVERSION=\"0.76\" -DXS_VERSION=\"0.76\" -I/usr/lib/perl5/5.6. 1/cygwin-multi/CORE dbdimp.c In file included from DB2.h:9, from dbdimp.c:8: D:/Programs/SQLLIB/include/sqlcli.h:311: warning: redefinition of `UCHAR' /usr/include/w32api/winnt.h:49: warning: `UCHAR' previously declared here D:/Programs/SQLLIB/include/sqlcli.h:312: warning: redefinition of `ULONG' /usr/include/w32api/winnt.h:51: warning: `ULONG' previously declared here D:/Programs/SQLLIB/include/sqlcli.h:313: warning: redefinition of `USHORT' /usr/include/w32api/winnt.h:50: warning: `USHORT' previously declared here Running Mkbootstrap for DBD::DB2 () chmod 644 DB2.bs rm -f blib/arch/auto/DBD/DB2/DB2.dll LD_RUN_PATH="" ld2 -s -L/usr/local/lib DB2.o dbdimp.o -o blib/arch/auto/DBD/DB2/DB2.dll /usr/lib/perl5/5.6.1/cygwin-m ulti/CORE/libperl5_6_1.a dllwrap --dllname DB2.dll --driver-name gcc --dlltool dlltool --export-all-symbols --as as --output-def libDB2.def --outp ut-lib libDB2.a \ -s -L/usr/local/lib DB2.o dbdimp.o /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6_1.a dllwrap: no export definition file provided dllwrap: creating one, but that may not be what you want dbdimp.o(.text+0x173):dbdimp.c: undefined reference to `SQLGetDiagRec@32' dbdimp.o(.text+0x737):dbdimp.c: undefined reference to `sqledosd_api@16' dbdimp.o(.text+0x7aa):dbdimp.c: undefined reference to `sqledgne_api@12' dbdimp.o(.text+0x882):dbdimp.c: undefined reference to `sqledcls_api@8' dbdimp.o(.text+0x928):dbdimp.c: undefined reference to `SQLAllocHandle@12' dbdimp.o(.text+0x9ff):dbdimp.c: undefined reference to `SQLSetConnectAttr@16' dbdimp.o(.text+0xa3e):dbdimp.c: undefined reference to `SQLConnect@28' dbdimp.o(.text+0xa7a):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0xabb):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0xbcc):dbdimp.c: undefined reference to `SQLAllocHandle@12' dbdimp.o(.text+0xc08):dbdimp.c: undefined reference to `SQLSetEnvAttr@16' dbdimp.o(.text+0xd5a):dbdimp.c: undefined reference to `SQLAllocHandle@12' dbdimp.o(.text+0xd92):dbdimp.c: undefined reference to `SQLExecDirect@12' dbdimp.o(.text+0xdd0):dbdimp.c: undefined reference to `SQLRowCount@8' dbdimp.o(.text+0xe09):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0xfe7):dbdimp.c: undefined reference to `SQLGetConnectAttr@20' dbdimp.o(.text+0x106e):dbdimp.c: undefined reference to `SQLAllocHandle@12' dbdimp.o(.text+0x10bd):dbdimp.c: undefined reference to `SQLSetStmtAttr@16' dbdimp.o(.text+0x10f3):dbdimp.c: undefined reference to `SQLPrepare@12' dbdimp.o(.text+0x1127):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0x1267):dbdimp.c: undefined reference to `SQLTransact@12' dbdimp.o(.text+0x12bf):dbdimp.c: undefined reference to `SQLTransact@12' dbdimp.o(.text+0x136b):dbdimp.c: undefined reference to `SQLDisconnect@4' dbdimp.o(.text+0x13f9):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0x1467):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0x1af3):dbdimp.c: undefined reference to `SQLSetConnectAttr@16' dbdimp.o(.text+0x1cc3):dbdimp.c: undefined reference to `SQLGetConnectAttr@20' dbdimp.o(.text+0x1d01):dbdimp.c: undefined reference to `SQLGetConnectAttr@20' dbdimp.o(.text+0x1f6b):dbdimp.c: undefined reference to `SQLNumResultCols@8' dbdimp.o(.text+0x1fc8):dbdimp.c: undefined reference to `SQLFreeStmt@8' dbdimp.o(.text+0x21e6):dbdimp.c: undefined reference to `SQLDescribeCol@36' dbdimp.o(.text+0x2276):dbdimp.c: undefined reference to `SQLColAttribute@28' dbdimp.o(.text+0x232a):dbdimp.c: undefined reference to `SQLBindCol@24' dbdimp.o(.text+0x27a4):dbdimp.c: undefined reference to `SQLAllocHandle@12' dbdimp.o(.text+0x297c):dbdimp.c: undefined reference to `SQLTables@36' dbdimp.o(.text+0x2af9):dbdimp.c: undefined reference to `SQLAllocHandle@12' dbdimp.o(.text+0x2b2e):dbdimp.c: undefined reference to `SQLPrepare@12' dbdimp.o(.text+0x2b83):dbdimp.c: undefined reference to `SQLNumParams@8' dbdimp.o(.text+0x340e):dbdimp.c: undefined reference to `SQLDescribeParam@24' dbdimp.o(.text+0x36bb):dbdimp.c: undefined reference to `SQLBindFileToParam@32' dbdimp.o(.text+0x372f):dbdimp.c: undefined reference to `SQLBindParameter@40' dbdimp.o(.text+0x37b6):dbdimp.c: undefined reference to `SQLSetConnectOption@12' dbdimp.o(.text+0x3a4c):dbdimp.c: undefined reference to `SQLExecute@4' dbdimp.o(.text+0x3c05):dbdimp.c: undefined reference to `SQLRowCount@8' dbdimp.o(.text+0x3dd3):dbdimp.c: undefined reference to `SQLFetch@4' dbdimp.o(.text+0x3e16):dbdimp.c: undefined reference to `SQLMoreResults@4' dbdimp.o(.text+0x443c):dbdimp.c: undefined reference to `SQLGetData@24' dbdimp.o(.text+0x450a):dbdimp.c: undefined reference to `SQLFreeStmt@8' dbdimp.o(.text+0x46fc):dbdimp.c: undefined reference to `SQLFreeHandle@8' dbdimp.o(.text+0x4ca5):dbdimp.c: undefined reference to `SQLSetStmtAttr@16' dbdimp.o(.text+0x5303):dbdimp.c: undefined reference to `SQLGetCursorName@16' dbdimp.o(.text+0x568f):dbdimp.c: undefined reference to `SQLMoreResults@4' dbdimp.o(.text+0x5aa2):dbdimp.c: undefined reference to `SQLGetStmtAttr@20' dbdimp.o(.text+0x5ae4):dbdimp.c: undefined reference to `SQLGetStmtAttr@20' collect2: ld returned 1 exit status dllwrap: gcc exited with status 1 perlld: *** system() failed to execute dllwrap --dllname DB2.dll --driver-name gcc --dlltool dlltool --export-all-symbols --as as --output-def libDB2.def --outp ut-lib libDB2.a \ -s -L/usr/local/lib DB2.o dbdimp.o /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6_1.a make: *** [blib/arch/auto/DBD/DB2/DB2.dll] Error 1 __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/