soundlord has asked for the wisdom of the Perl Monks concerning the following question:
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...
I tried to locate the .so file without success, all I have are the .pm files that the C languagenewXS("DBI::bootstrap", boot_DBI, file); newXS("SMTP::bootstrap", boot_SMTP, file);
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 ?#! /usr/bin/perl use Net::SMTP; use DBI; sub sendmail() { my $this_function = (caller(0))[3]; print "[PERL -- $this_function]\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [Linux][Perl 5.20.1] embedded perl in C application
by Corion (Patriarch) on Mar 31, 2018 at 17:03 UTC | |
by soundlord (Novice) on Apr 02, 2018 at 00:31 UTC | |
by hippo (Archbishop) on Apr 02, 2018 at 11:50 UTC | |
|
Re: [Linux][Perl 5.20.1] embedded perl in C application
by soundlord (Novice) on Mar 31, 2018 at 16:31 UTC |