I have managed to get DBD::DB2 using the ppm install. But now when I use:

I get this error.
H:\>perl db2.pl
Your vendor has not defined DBD::DB2::Constants macro SQL_PARAM_INPUT_OUTPUT at 
C:/strawberry/perl/site/lib/DBD/DB2.pm line 40
Compilation failed in require at db2.pl line 3.
BEGIN failed--compilation aborted at db2.pl line 3.


Db2.pl is

  use DBI;
  use DBD::DB2::Constants;
  use DBD::DB2;
  my $db = 'xxxxxxxxx';
  my $hostname ='xxxxxxxxx;
  my $port = 50000;

   my $string = "dbi:DB2:DATABASE=$db; HOSTNAME=$hostname;";
  $dbh = DBI->connect($string, xxxxxx', 'xxxxxx') || die "Connection failed 
with error: $DBI::errstr";




________________________________
From: Thakore, Kartik
Sent: Monday, December 14, 2009 3:17 PM
To: 'dbi-users@perl.org'
Subject: DBD::DB2 on Windows with Strawberry Perl

Hello,

I am trying to install DBD::DB2 on windows and I have IBM Express-C installed. 
Here is the error I receive:

cpan DBD::DB2


Database was generated on Mon, 14 Dec 2009 14:20:38 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.t
ar.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:/strawberry/c"
System: perl5.010000 DBI1.609 Win32 strawberryperl 5.10.0.6 #1 Mon Jul 20 00:01:
14 2009 i386 MSWin32-x86-multi-thread dl_win32.xs
Compiler: gcc -s -O2  -s -O2 -DWIN32 -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX
Includes:  -I"c:/strawberry/c/include" -I"C:\strawberry\perl\site\lib/auto/DBI"
-I"C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl\site\lib/auto/DBI"
Libraries: -L"c:/strawberry/c/lib" db2cli.lib db2api.lib -L"C:/PROGRA~1/IBM/SQLL
IB/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
Checking if your kit is complete...
Looks good
Writing Makefile for DBD::DB2::Constants
Writing Makefile for DBD::DB2
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\Constan
ts)
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp  -typemap
 C:\strawberry\perl\lib\ExtUtils\typemap  Constants.xs > Constants.xsc && C:\str
awberry\perl\bin\perl.exe -MExtUtils::Command -e "mv" -- Constants.xsc Constants
.c
gcc -c  -I"c:/strawberry/c/include"     -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX
-s -O2    -DVERSION=\"1.76\"    -DXS_VERSION=\"1.76\"  "-IC:\strawberry\perl\lib
\CORE"   Constants.c
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', 'D
L_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" Constants
.o -Wl,--image-base,0x370e0000  C:\strawberry\perl\lib\CORE\libperl510.a -lmsvcr
t -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshel
l32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc
32 -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:\strawber
ry\perl\lib\CORE" -L"C:\strawberry\c\lib" Constants.o -Wl,--image-base,0x370e000
0  C:\strawberry\perl\lib\CORE\libperl510.a -lmsvcrt -lmoldname -lkernel32 -luse
r32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lneta
pi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 dll.exp
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 ..\blib\ar
ch\auto\DBD\DB2\Constants\Constants.dll
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "cp" -- Constants.bs ..\b
lib\arch\auto\DBD\DB2\Constants\Constants.bs
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 ..\blib\ar
ch\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:\strawberry\perl
\bin\perl.exe -MExtUtils::Command -e "mv" -- DB2.xsc DB2.c
gcc -c  -I"c:/strawberry/c/include" -I"C:\strawberry\perl\site\lib/auto/DBI" -I"
C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl\site\lib/auto/DBI"
-s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fn
o-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2    -DVERSION=\"1.76\"    -DXS_VER
SION=\"1.76\"  "-IC:\strawberry\perl\lib\CORE"  -DDB2_CACHE_FIX DB2.c
gcc -c  -I"c:/strawberry/c/include" -I"C:\strawberry\perl\site\lib/auto/DBI" -I"
C:\strawberry\perl\lib/auto/DBI" -I"C:\strawberry\perl\site\lib/auto/DBI"
-s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fn
o-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2    -DVERSION=\"1.76\"    -DXS_VER
SION=\"1.76\"  "-IC:\strawberry\perl\lib\CORE"  -DDB2_CACHE_FIX dbdimp.c
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       dbdimp.o  -Wl,--
image-base,0x202e0000  C:\strawberry\perl\lib\CORE\libperl510.a c:\strawberry\c\
lib\libmsvcrt.a c:\strawberry\c\lib\libmoldname.a c:\strawberry\c\lib\libkernel3
2.a c:\strawberry\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\libad
vapi32.a c:\strawberry\c\lib\libshell32.a c:\strawberry\c\lib\libole32.a c:\stra
wberry\c\lib\liboleaut32.a c:\strawberry\c\lib\libnetapi32.a c:\strawberry\c\lib
\libuuid.a c:\strawberry\c\lib\libws2_32.a c:\strawberry\c\lib\libmpr.a c:\straw
berry\c\lib\libwinmm.a c:\strawberry\c\lib\libversion.a c:\strawberry\c\lib\libo
dbc32.a c:\strawberry\c\lib\libodbccp32.a dll.exp
dbdimp.o:dbdimp.c:(.text+0x364): undefined reference to `sqledosd_...@16'
dbdimp.o:dbdimp.c:(.text+0x3e6): undefined reference to `sqledgne_...@12'
dbdimp.o:dbdimp.c:(.text+0x4cc): undefined reference to `sqledcls_...@8'
dbdimp.o:dbdimp.c:(.text+0x5526): undefined reference to `sqlbindfiletopa...@32'

collect2: ld returned 1 exit status
dmake.EXE:  Error code 129, while making 'blib\arch\auto\DBD\DB2\DB2.dll'
  IBMTORDB2/DBD-DB2-1.76.tar.gz
  C:\strawberry\c\bin\dmake.EXE -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

I am not sure what is wrong.

Kthakore

Reply via email to