Greetings !!
C application using Perl functions
I did correctly stuff to call a perl function in a C application that was a lot of fun ^^
This application is about to send mails to customers with a snapshot (an image) with a watermark on it
giving the code they would use to access the party they have paid for...
I tried in full C but sending mail with attachment is a real nightmare,
so I decided to keep the application and call Perl functions using well done
modules efficient for mail composing and attachment handling.
The problem is that for the DBI module I got no particular problem to have it xsinit'd (simply linking the DBI.so library)
BUT
concerning the Net::SMTP module, I'm stucked, the compiler (gcc 4.8.3 rev 212064) told me that there is no reference to what is behind
boot_SMTP regarding the xs_init code...
newXS("DBI::bootstrap", boot_DBI, file);
newXS("SMTP::bootstrap", boot_SMTP, file);
I tried to
locate the
.so file without success, all I have are the
.pm files that the C language
seems not to handle as the Perl does :{
For now my perl source looks like this:
#! /usr/bin/perl
use Net::SMTP;
use DBI;
sub sendmail()
{
my $this_function = (caller(0))[3];
print "[PERL -- $this_function]\n";
}
The application
works without the
Net::STMP reference at the
use keyword.
Can someone could give me a way to solve this ridiculous compilation error ?