Hi Ronnald,

In fact the error was older than the change. That is: I put the use DBI with
the same error, put use DBD:mysql with the same error, put both and the
error persists...

And the most strange of all:

When I compile through script like:

perl -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD/mysql
     -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD
     -I/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto
     -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 -I/usr/local/lib/perl5/site_perl
     -I.  -MO=C,-umain,-uattributes,-uDB,-oteste.c teste.pl

Which generates the .c source, and:

gcc  -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
       -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE
        -o teste
teste.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/DynaLoader.a
       -L/usr/local/lib/perl5/5.6.1/i686-linux/CORE -lperl -lnsl -ldl -lm -l
c -lcrypt -lutil
       -L/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD -I/usr/loc
al/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD
       -L/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD/mysql -I/u
sr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBD/mysql

That compiles the code.

The code is correctly compiled (without compilation errors), but gives me
the error when I execute.

When I use perlcc -o teste teste.pl directly it doesn't compile giving me
the follow error:


:/tmp/ccQdhdK8.o: In function `dl_init':
/tmp/ccQdhdK8.o(.text+0xb36b8): undefined reference to `boot_DBI'
/tmp/ccQdhdK8.o(.text+0xb376e): undefined reference to `boot_DBD__mysql'
collect2: ld returned 1 exit status

And by the way, the source runs ok in Perl without the use DBI, only using
use DBD:mysql.

[]s
Slepetys





----- Original Message -----
From: "Ronald J Kimball" <[EMAIL PROTECTED]>
To: "Roberto Slepetys Ferreira" <[EMAIL PROTECTED]>
Cc: "Sterin, Ilya" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 1:45 PM
Subject: Re: PERLCC and DBI


> On Wed, Apr 11, 2001 at 01:39:58PM -0300, Roberto Slepetys Ferreira wrote:
>
> > I changed the use part to use DBD:mysql - that works fine in perl, but
> > continues to give-me an error with perlcc as below:
> >
> > Can't locate object method "connect" via package "DBI" (perhaps you
forgot
> > to load "DBI"?) at teste.pl line 9.
>
> Of course, because you didn't load the DBI module.
>
> > The script is writen below:
> >
> > #!/usr/bin/perl
> >
> > use CGI qw(:standard);
> > use DBD::mysql;
>
> Take out the use DBD::mysql line, and replace it with:
>
> use DBI;
>
>
> The DBI module will handle loading the appropriate DBD module, based on
the
> arguments to DBI->connect().
>
>
> Ronald
>

Reply via email to