I encountered a small problem while installing DBD-ODBC-0.28 in this
environment:
Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
...
Compiler:
cc='bcc32', ccflags ='-O2 -5 -D_RTLDLL -g0 -DWIN32 -DHAVE_DES_FCRYPT
-D_MT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS',
...
The compiler is Borland C++ 5.5.1!
Running perl Makefile.PL:
Note (probably harmless): No library found for 'ODBC32.LIB'
That's because ODBC32.LIB is in $Config{libpth}/PSDK now.
A possible solution could be:
$opts{LIBS} = ["-L$Config{libpth}/PSDK -lODBC32.LIB"] if $Config{cc}
eq 'bcc32';
However, this is specific for BC++ 5.5.x. I prefer:
qx'implib ODBC32.LIB %SystemRoot%\system32\odbc32.dll';
Other suggestions?
Attached is a patch for Makefile.PL.
Steffen Goeldner
*** DBD-ODBC-0.28/Makefile.PL Thu Mar 09 05:45:04 2000
--- DBD-ODBC-0.28a/Makefile.PL Tue Jun 26 11:00:42 2001
***************
*** 50,55 ****
--- 50,62 ----
my $dbi_dir = dbd_dbi_dir();
my $dbi_arch_dir = dbd_dbi_arch_dir();
+ if ($^O eq 'MSWin32') {
+ if ($Config{cc} eq 'bcc32') {
+ # XXX: Test for compiler version (e.g. Borland C++ 5.5.x)?
+ print "Trying to generate ./ODBC32.LIB ...\n";
+ print qx'implib ODBC32.LIB %SystemRoot%\system32\odbc32.dll';
+ }
+ }
open(SQLH, ">dbdodbc.h") || die "Can't open dbdodbc.h: $!\n";
print SQLH "/* Do not edit this file. It is automatically written by Makefile.PL.\n";
print SQLH " Any changes made here will be lost. \n*/\n\n";