Well did you use DBI? Try to run script with interpreter to see if that
works first.
Ilya Sterin
-----Original Message-----
From: Roberto Slepetys Ferreira [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 5:28 PM
To: [EMAIL PROTECTED]
Subject: PERLCC and DBI
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...
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 -I/usr/local/lib/perl5/site_perl
-I. -MO=C,-umain,-uattributes,-uDB,-ofile.c file.pl
Then, I compile it using:
gcc -fno-strict-aliasing -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/DynaLoader.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/
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.
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