Hi Kartik, In the linker command issued I see that there is no reference to C:\......\sqllib\lib directory. If you are able to figure out this then your problem should be solved.
g++ -o blib\arch\auto\DBD\DB2\DB2.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" DB2.o dbdim berry\c\lib\libuser32.a C:\strawberry\c\lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\strawberry\c\lib\libcomdlg32.a C:\strawberry\c\lib\libadv ry\c\lib\libuuid.a C:\strawberry\c\lib\libws2_32.a C:\strawberry\c\lib\libmpr.a C:\strawberry\c\lib\libwinmm.a C:\strawberry\c\lib\libversion.a C:\st Not sure why is this happening. I have no much idea on Strawberry Perl, seeing the commands and reading through the wiki on Strawberry Perl I get that it is using a linux/Unix like env (which is evident from the extensions of files in your gcc command (.a)). I came across this link (quite old) might be this can help you http://www.cygwin.com/ml/cygwin/2002-01/msg00255.html BTW, why don't you use Activestate perl which is supported and you get pre-built binaries for it (ppm install). Thanking You Praveen D "Thakore, Kartik" <kartik.thak...@cibc.com> 17/12/2009 23:03 To Praveen Devarao/India/i...@ibmin cc "dbi-users@perl.org" <dbi-users@perl.org> Subject RE: DBD::DB2 on Windows with Strawberry Perl Hi Praveen, Same problem C:\Documents and Settings\thakore\Desktop\DBD-DB2-1.75>set LIB=C:\Program Files\IBM\SQLLIB\lib C:\Documents and Settings\thakore\Desktop\DBD-DB2-1.75>set DB2_HOME=C:\Program Files\IBM\SQLLIB C:\Documents and Settings\thakore\Desktop\DBD-DB2-1.75>perl Makefile.PL Configuring DBD::DB2... Remember to actually read the README and CAVEATS files! Using DB2 in "C:/Program Files/IBM/SQLLIB" System: perl5.010001 DBI1.609 Win32 strawberryperl 5.10.1.0 #1 30 i386 MSWin32-x86-multi-thread dl_win32.xs Compiler: gcc -s -O2 -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_M Includes: -I"C:/Program Files/IBM/SQLLIB/include" -I"C:\strawberry\perl\site\lib/auto/DBI" -I"C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl Libraries: -L"C:/Program Files/IBM/SQLLIB/lib" db2cli.lib db2api.lib -L"C:/Program Files/IBM/SQLLIB/lib " Note (probably harmless): No library found for db2cli.lib Note (probably harmless): No library found for db2api.lib Writing Makefile for DBD::DB2::Constants Writing Makefile for DBD::DB2 C:\Documents and Settings\thakore\Desktop\DBD-DB2-1.75>make 'make' is not recognized as an internal or external command, operable program or batch file. C:\Documents and Settings\thakore\Desktop\DBD-DB2-1.75>dmake cp DB2.pm blib\lib\DBD\DB2.pm cp lib/Bundle/DBD/DB2.pm blib\lib\Bundle\DBD\DB2.pm cp DB2.pod blib\lib\DBD\DB2.pod cp Constants.pm ..\blib\lib\DBD\DB2\Constants.pm AutoSplitting ..\blib\lib\DBD\DB2\Constants.pm (..\blib\lib\auto\DBD\DB2\Constants) C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap Constants.xs > Constants.xs gcc -c -I"C:/Program Files/IBM/SQLLIB/include" -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_ Running Mkbootstrap for DBD::DB2::Constants () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Constants.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"DBD::DB2::Constants\", 'DLBASE' => 'Constants', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => [ dlltool --def Constants.def --output-exp dll.exp g++ -o ..\blib\arch\auto\DBD\DB2\Constants\Constants.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 dll.exp dlltool --def Constants.def --base-file dll.base --output-exp dll.exp g++ -o ..\blib\arch\auto\DBD\DB2\Constants\Constants.dll -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Constants.o -Wl,--image-bas ut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 dll.exp C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 ..\blib\arch\auto\DBD\DB2\Constants\Constants.dll C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "cp" -- Constants.bs ..\blib\arch\auto\DBD\DB2\Constants\Constants.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 ..\blib\arch\auto\DBD\DB2\Constants\Constants.bs C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap DB2.xs > DB2.xsc && C:\stra gcc -c -I"C:/Program Files/IBM/SQLLIB/include" -I"C:\strawberry\perl\site\lib/auto/DBI" -I"C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl\ve IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"1.75\" -DXS_VERSION=\"1.75\" "-IC:\strawberry\perl\lib\CORE" -DDB2 gcc -c -I"C:/Program Files/IBM/SQLLIB/include" -I"C:\strawberry\perl\site\lib/auto/DBI" -I"C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl\ve IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"1.75\" -DXS_VERSION=\"1.75\" "-IC:\strawberry\perl\lib\CORE" -DDB2 Running Mkbootstrap for DBD::DB2 () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 DB2.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"DBD::DB2\", 'DLBASE' => 'DB2', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" dlltool --def DB2.def --output-exp dll.exp g++ -o blib\arch\auto\DBD\DB2\DB2.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" DB2.o dbdim berry\c\lib\libuser32.a C:\strawberry\c\lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\strawberry\c\lib\libcomdlg32.a C:\strawberry\c\lib\libadv ry\c\lib\libuuid.a C:\strawberry\c\lib\libws2_32.a C:\strawberry\c\lib\libmpr.a C:\strawberry\c\lib\libwinmm.a C:\strawberry\c\lib\libversion.a C:\st dbdimp.o:dbdimp.c:(.text+0x40d): undefined reference to `sqledosd_...@16' dbdimp.o:dbdimp.c:(.text+0x496): undefined reference to `sqledgne_...@12' dbdimp.o:dbdimp.c:(.text+0x57c): undefined reference to `sqledcls_...@8' dbdimp.o:dbdimp.c:(.text+0x55d6): undefined reference to `sqlbindfiletopa...@32' collect2: ld returned 1 exit status dmake: Error code 129, while making 'blib\arch\auto\DBD\DB2\DB2.dll' From: Praveen Devarao [mailto:praveen...@in.ibm.com] Sent: Thursday, December 17, 2009 12:15 PM To: Thakore, Kartik Cc: dbi-users@perl.org Subject: RE: DBD::DB2 on Windows with Strawberry Perl Hi Karthik, Instead of trying installation through cpan command, try downloading the source and then build manually from it following instructions from the link http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335 Seems like when cpan command is issued your env settings is not be being recognised. Thanking You ------------------------------------------------------------------------- Praveen D Manyata Embassy Business Park D2,1st Floor,Outer Ring Road Nagavara Rachenahalli,Bangalore:560 045 Email : praveen...@in.ibm.com ------------------------------------------------------------------------- "Thakore, Kartik" <kartik.thak...@cibc.com> 17/12/2009 20:14 To Praveen Devarao/India/i...@ibmin cc "dbi-users@perl.org" <dbi-users@perl.org> Subject RE: DBD::DB2 on Windows with Strawberry Perl HI Praveen, I am getting the same problem. The weird thing Is I have both those files in C:\Program Files\IBM\SQLLIB\lib C:\ >set LIB=C:\Program Files\IBM\SQLLIB\lib C:\ >set DB2_HOME=C:\Program Files\IBM\SQLLIB\lib C:\ >cpan DBD::DB2 Database was generated on Wed, 16 Dec 2009 16:54:25 GMT Running install for module 'DBD::DB2' Running make for I/IB/IBMTORDB2/DBD-DB2-1.76.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\I\IB\IBMTORDB2\DBD-DB2-1.76.tar.gz ok CPAN.pm: Going to build I/IB/IBMTORDB2/DBD-DB2-1.76.tar.gz Configuring DBD::DB2... Remember to actually read the README and CAVEATS files! Using DB2 in "C:/Program Files/IBM/SQLLIB/lib" System: perl5.010001 DBI1.609 Win32 strawberryperl 5.10.1.0 #1 30 i386 MSWin32-x86-multi-thread dl_win32.xs Compiler: gcc -s -O2 -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX Includes: -I"C:/Program Files/IBM/SQLLIB/lib/include" -I"C:\strawberry\perl\site\lib/auto/DBI" -I"C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl\vendor\lib/auto/DBI" -I"C:\strawberry\perl\site\lib/auto/DBI" Libraries: -L"C:/Program Files/IBM/SQLLIB/lib/lib" db2cli.lib db2api.lib -L"C:/Program Files/IBM/SQLLIB/lib" Checking if your kit is complete... Looks good Note (probably harmless): No library found for db2cli.lib Note (probably harmless): No library found for db2api.lib Regards From: Praveen Devarao [mailto:praveen...@in.ibm.com] Sent: Wednesday, December 16, 2009 11:35 PM To: Thakore, Kartik Cc: dbi-users@perl.org Subject: RE: DBD::DB2 on Windows with Strawberry Perl Hi Kartik, During compilation there are 2 warnings, as below Note (probably harmless): No library found for db2cli.lib Note (probably harmless): No library found for db2api.lib Seems like you don't have the DB2 lib path ( C:\Program Files\IBM\SQLLIB\lib ) in you environment setting. Set the DB2_HOME env variable as below and you should be able to successfully compile and install the DBD-DB2 driver. set DB2_HOME=C:\Program Files\IBM\SQLLIB\lib or set LIB=C:\Program Files\IBM\SQLLIB\lib;%LIB% If setting these variables don't work, then check the location C:\Program Files\IBM\SQLLIB\lib to ensure that the necessary libraries are present, if not then you might want to re-check you DB2 installation. (FYI: If this the case seems like you have opted for a custom installation of DB2 and have not selected application development tools. you might want to add this pack too) Regarding the ppm install, as mentioned earlier, the ppd packages in that repository is for ActiveState Perl, hence might be there is some mismatches. Let me know how it goes. Thanking You ------------------------------------------------------------------------- Praveen D Manyata Embassy Business Park D2,1st Floor,Outer Ring Road Nagavara Rachenahalli,Bangalore:560 045 Email : praveen...@in.ibm.com ------------------------------------------------------------------------- "Thakore, Kartik" <kartik.thak...@cibc.com> 16/12/2009 23:55 To Praveen Devarao/India/i...@ibmin cc "dbi-users@perl.org" <dbi-users@perl.org> Subject RE: DBD::DB2 on Windows with Strawberry Perl Hi, This is db2level: DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09071" with level identifier "08020107". Informational tokens are "DB2 v9.7.100.177", "s091114", "IP23028", and Fix Pack "1". Product is installed at "C:\PROGRA~1\IBM\SQLLIB" with DB2 Copy Name "DB2LOCAL". Also I tried cpan DBD::DB2 to try an compile but I get the first errors. Then I used Strawberry ppm to install DBD::DB2 from the Winnipeg location. Using this: ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/DBD-DB2.ppd Thank you Kartik Thakore -----Original Message----- From: Praveen [mailto:praveen...@in.ibm.com] Sent: Wednesday, December 16, 2009 7:59 AM To: dbi-users@perl.org Subject: Re: DBD::DB2 on Windows with Strawberry Perl Hi Kartik, Seems like your installation is not taken place properly. Could you let me know if the DBD-DB2 driver was taken from cpan or from the uwinnipeg repository ( ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-DB2.ppd ). The winnipeg respository contains DBD-DB2 for ActivePerl (from activestate), hence might be the problem. If you are trying a manual installation then you might want to go through this page for steps of manual installation on windows (for which you will need MingW compiler and dmake utility or VC). http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335 [Note: currently the page shows 1.75 as latest, but it is 1.76 (the page update process is in progress)]. If your problem is still not solved could you provide with the details of DB2 version being used (db2level). Thanks Praveen