Tim Bunce wrote:
>
> On Wed, Sep 24, 2003 at 11:24:17AM +0200, Steffen Goeldner wrote:
>
[...]
>
> > dmake
> > ...
> > Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
> > Error: Unresolved external '_SQLEnvGet' referenced from
> > C:\TEMP\DBD-ORACLE-1.15\DBDIMP.OBJ
> > Error: Unresolved external '_SQLSvcCtxGet' referenced from
> > C:\TEMP\DBD-ORACLE-1.15\DBDIMP.OBJ
>
> If you (or someone else) are familar enough with windows, could you
> check if those symbols are in some other oracle library that we're
> not linking with?
>
> (Otherwise you could just remove the if(use_proc_connection){...} blocks
> so you can continue testing the rest of the code.)
O.k., to continue I added an option for Makefile.PL and some #ifdef's in
dbdimp.c. I'm not sure if this option (and its name) is a good idea. Thus
I try to find those symbols and the library ...
Steffen
diff -cb DBD-Oracle-1.15-orig/Makefile.PL DBD-Oracle-1.15/Makefile.PL
*** DBD-Oracle-1.15-orig/Makefile.PL Tue Sep 23 00:31:19 2003
--- DBD-Oracle-1.15/Makefile.PL Wed Sep 24 20:39:07 2003
***************
*** 84,92 ****
$::opt_f = 0; # include text of oracle's .mk file within generated Makefile
$::opt_F = 0; # force - ignore errors
$::opt_W = 0; # just write a basic default Makefile (won't build)
Getopt::Long::config( qw( no_ignore_case ) );
! GetOptions(qw(b! v! d! g! p! l! c! 8! f! F! W! m=s n=s s=s S=s))
or die "Invalid arguments";
$::opt_g &&= '-g'; # convert to actual string
--- 84,93 ----
$::opt_f = 0; # include text of oracle's .mk file within generated Makefile
$::opt_F = 0; # force - ignore errors
$::opt_W = 0; # just write a basic default Makefile (won't build)
+ $::opt_ProC = 1; # use ProC
Getopt::Long::config( qw( no_ignore_case ) );
! GetOptions(qw(b! v! d! g! p! l! c! 8! f! F! W! m=s n=s s=s S=s ProC!))
or die "Invalid arguments";
$::opt_g &&= '-g'; # convert to actual string
***************
*** 581,586 ****
--- 582,589 ----
$opts{DEFINE} .= ' -Xa' if $Config{cc} eq 'clcc'; # CenterLine CC
+ $opts{DEFINE} .= ' -DHAVE_NO_PRO_C' unless $::opt_ProC;
+
if ($::opt_8) {
$opts{DEFINE} .= ' -DNO_OCI8';
print "\n******************************************************\n";
Common subdirectories: DBD-Oracle-1.15-orig/Oracle.ex and DBD-Oracle-1.15/Oracle.ex
diff -cb DBD-Oracle-1.15-orig/dbdimp.c DBD-Oracle-1.15/dbdimp.c
*** DBD-Oracle-1.15-orig/dbdimp.c Thu Jun 12 01:04:35 2003
--- DBD-Oracle-1.15/dbdimp.c Wed Sep 24 20:44:11 2003
***************
*** 17,23 ****
#include "Oracle.h"
/* #include <sql2oci.h> for SQL_SINGLE_RCTX but causes clashes */
! #if !defined(SQL_SINGLE_RCTX) && defined(OCI_V8_SYNTAX)
#define SQL_SINGLE_RCTX (dvoid *)0 /* from precomp/public/sqlcpr.h */
#endif
--- 17,23 ----
#include "Oracle.h"
/* #include <sql2oci.h> for SQL_SINGLE_RCTX but causes clashes */
! #if !defined(SQL_SINGLE_RCTX) && defined(OCI_V8_SYNTAX) && !defined(HAVE_NO_PRO_C)
#define SQL_SINGLE_RCTX (dvoid *)0 /* from precomp/public/sqlcpr.h */
#endif
***************
*** 321,328 ****
init_mode |= OCI_THREADED;
#endif
- #ifdef SQL_SINGLE_RCTX
if(use_proc_connection) {
/* Use existing SQLLIB connection. Do not call OCIInitialize(), */
/* since presumably SQLLIB already did that. */
status = SQLEnvGet(SQL_SINGLE_RCTX, &imp_drh->envhp);
--- 321,328 ----
init_mode |= OCI_THREADED;
#endif
if(use_proc_connection) {
+ #ifdef SQL_SINGLE_RCTX
/* Use existing SQLLIB connection. Do not call OCIInitialize(), */
/* since presumably SQLLIB already did that. */
status = SQLEnvGet(SQL_SINGLE_RCTX, &imp_drh->envhp);
***************
*** 332,340 ****
"SQLEnvGet. Failed to load ProC environment.");
return 0;
}
}
else { /* Normal connect. */
- #endif /* SQL_SINGLE_RCTX*/
imp_drh->proc_handles = 0;
/* XXX recent oracle docs recommend using OCIEnvCreate() instead of */
--- 332,340 ----
"SQLEnvGet. Failed to load ProC environment.");
return 0;
}
+ #endif /* SQL_SINGLE_RCTX*/
}
else { /* Normal connect. */
imp_drh->proc_handles = 0;
/* XXX recent oracle docs recommend using OCIEnvCreate() instead of */
***************
*** 356,361 ****
--- 356,362 ----
if (shared_dbh_ssv) {
if (!imp_dbh->envhp) {
if(use_proc_connection) {
+ #ifdef SQL_SINGLE_RCTX
status = SQLEnvGet(SQL_SINGLE_RCTX, &imp_dbh->envhp);
imp_dbh->proc_handles = 1;
if (status != SQL_SUCCESS) {
***************
*** 363,368 ****
--- 364,370 ----
"SQLEnvGet. Failed to load ProC environment.");
return 0;
}
+ #endif /* SQL_SINGLE_RCTX*/
}
else {
OCIEnvInit_log_stat( &imp_dbh->envhp, OCI_DEFAULT, 0, 0, status);
***************
*** 382,387 ****
--- 384,390 ----
if (!shared_dbh) {
if(use_proc_connection) {
+ #ifdef SQL_SINGLE_RCTX
imp_dbh->proc_handles = 1;
status = SQLSvcCtxGet(SQL_SINGLE_RCTX, dbname, strlen(dbname),
&imp_dbh->svchp);
***************
*** 408,413 ****
--- 411,417 ----
OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
return 0;
}
+ #endif /* SQL_SINGLE_RCTX*/
}
else { /* !use_proc_connection */
imp_dbh->proc_handles = 0;
Common subdirectories: DBD-Oracle-1.15-orig/hints and DBD-Oracle-1.15/hints
Common subdirectories: DBD-Oracle-1.15-orig/lib and DBD-Oracle-1.15/lib
Common subdirectories: DBD-Oracle-1.15-orig/t and DBD-Oracle-1.15/t