Please resend to dbi-users. The dbi-dev list isn't the place to ask. Tim.
On Tue, Jun 25, 2002 at 12:27:59PM -0400, [EMAIL PROTECTED] wrote: > Hi > When I execute with Perl, I don't have any problems. When I do an > executable with perlcc, at the moment I execute the archive, I get the > message 'Can't locate object method connect via package DBI' " > > i need help please about this problem!!!! > > The source code is very simple: > > #!/usr/local/bin/perl -w > use DBI; > $dbh; > $sth; > { > $v_dbname = $ENV{ORACLE_SID}; > $v_userDB = 'fa'; > $v_passDB = 'af1'; > $v_dbd = 'Oracle'; > > #================= Conexión a BD ======================== > $dbh=DBI->connect($v_dbname,$v_userDB,$v_passDB,$v_dbd) || die "Error de > Conexión: $DBI::errstr. \n"; > $sth=$dbh->prepare(" > select to_char(sysdate, 'dd/mm/yyyy hh24:mm:dd') > from dual > "); > $sth->execute; > @row=$sth->fetchrow_array; > print "La fecha del sistema es: $row[0]\n"; > } > > the output of 'perl -V' is: > > Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: > Platform: > osname=aix, osvers=4.3.2.0, archname=aix > uname='aix antuco_stby 3 4 000123934c00 ' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef useperlio=undef d_sfio=undef > Compiler: > cc='cc', optimize='-O', gccversion= > cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192' > ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192' > stdchar='unsigned char', d_stdstdio=define, usevfork=false > intsize=4, longsize=4, ptrsize=4, doublesize=8 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 > alignbytes=8, usemymalloc=n, prototype=define > Linker and Libraries: > ld='ld', ldflags ='' > libpth=/lib /usr/lib /usr/ccs/lib > libs=-lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW > libc=, so=a, useshrplib=false, libperl=libperl.a > Dynamic Linking: > dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp' > cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp > -bE:$(BASEEXT).exp -b noentry -lc' > > > Characteristics of this binary (from libperl): > Built under aix > Compiled at Apr 8 2000 19:49:22 > @INC: > /usr/local/lib/perl5/5.00503/aix > /usr/local/lib/perl5/5.00503 > /usr/local/lib/perl5/site_perl/5.005/aix > /usr/local/lib/perl5/site_perl/5.005 > > > Thanks for you help.... > > > Muy atentamente, > > Germán Marambio Vargas > > > -----Original Message----- > > From: Roberto Slepetys Ferreira [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 11, 2001 7:37 AM > > To: [EMAIL PROTECTED] > > Subject: DBI and PERLCC > > > > > > Hi, > > > > I am starting to use the Perl Compiler perlcc to make some > > tests... Ok, Ok, it's only a beta, maybe an alfa.... > > > > But... > > At the top of your source: > > BEGIN { > require DBI; > require DBD::Mysql; > } > > > > > I am trying to compile very single scripts using an script > > that emules the PERLCC, basicly it generates the C code with: > > > > perl -I/usr/local/lib/perl5/5.6.1/i686-linux > > -I/usr/local/lib/perl5/5.6.1 > > -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux > -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI > > -I/usr/local/lib/perl5/site_perl/5.6.1 > > -I/usr/local/lib/perl5/site_perl -I. > > -MO=C,-umain,-uattributes,-uDB,-ofile.c file.pl > ^^ > -MO=C,-umain,-uattributes,-uDBI,-uDBD::Mysql,-ofile.c file.pl > > > > > > > > Then, I compile it using: > > > > gcc -fno-strict-aliasing -D-D_LARGEFILE_SOURCE > > -D_FILE_OFFSET_BITS=64 > > -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -o ./$arquivo > > $arquivo.c -rdynamic > > -Wl,-rpath,/usr/local/lib/perl5/5.6.1/i686-linux/CORE > > -L/usr/local/lib > > /usr/local/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoad > > er.a -L/usr/local/lib/perl5/5.6.1/i686-linux/CORE -lperl > > -lnsl -ldl -lm -lc -lcrypt -lutil > > -L/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ > > -I/usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/ > > > Umm! Where's DBI? Try this or similar. > > gcc -fno-strict-aliasing -DDYNALOADER_BOOTSTRAP -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.6.1/i686-linux/CORE -o file > file.c -rdynamic -L/usr/local/lib > /usr/lib/perl5/5.6.1/i686-linux/auto/DynaLoader/DynaLoader.a > -L/usr/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix > -lcrypt -lutil -L/usr/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD/ODBC/ > -L/usr/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI/ > -I/usr/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI/ > > > When I use it in a very simple scripts like scripts without > > calling modules, or calling modules like CGI.pm it works fine. > > > > But when I try to use de DBI to connect to a MySQL database, > > I compile the archive, but when I try to execute it returns > > an error not present in the original script: > > > > Can't locate object method "connect" via package "DBI" > > (perhaps you forgot to load "DBI"?) at teste.pl line 9. > > You should be a bit further on the road after that: > > Undefined subroutine &DBI::dr::connect called at > /usr/lib/perl5/site_perl/5.6.1/ > i686-linux/DBI.pm line 408. > > Which is obviously not complete. But at least the package is loaded if you > really want to play with it. > > So the question now is, does anybody know what's going on here! > ^^^^^ > > > > I included the mysql DBD directories and put use DBD::mysql > > into the code without sucess. > > > > Do anyone have any idea of what is going on it ? > > > > Thanks > > Slepetys > > > > __________________________________________________________________________ > Please Note : > Only the intended recipient is authorised to access or use this e-mail.. > If > you are not the intended recipient, > please delete this e-mail and notify the sender immediately. The contents > of this e-mail are the writer's > opinion and are not necessarily endorsed by the Gunz Companies unless > expressly stated. > > We use virus scanning software but exclude all liability for viruses or > similar in any attachment. > > > >