Hi Neill,

I think that we are making progress !!!

The executable size rose, and the error changed:

Now it's:


Undefined subroutine &DBI::dr::connect called at
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 408.

[]s
Slepetys

----- Original Message -----
From: "Neil Lunn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 5:11 AM
Subject: RE: DBI and PERLCC


> > -----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.
>
>
>

Reply via email to