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 ?


In reply to [Linux][Perl 5.20.1] embedded perl in C application by soundlord

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.