The following is what I told opensourcer in the chatterbox edited slightly.

So you embedded perl inside your C++ application and wish to make C calls from perl? This is covered in perlembed: Perl ways to embed perl in your C and C++ application, perlxstut: Perl XS tutorial, perlxs: Perl XS application programming interface, . There are things you can do to make your DLL creation mostly implicit like Inline::C but in the end, you do end up with a DLL. That is, for the part where you call the C from perl. All the normal approaches anyway.

I suppose that since you're already in C++ when calling perl you might be able to get perl to use functions from within the executable. That's probably pretty untraveled. Your best bet is to read the available documentation and try some things out.

Well, that it is my opinion that it is relatively untraveled. It sounds like it should be relatively straightforward once you've handled the embedding. Simon Cozens also has the Extending and embedding perl book on this. You'll probably get better help if you can come up with more specific questions after actually working with this. I'll at least encourage you by saying it sounds like it should be very possible.


In reply to Re: c fucntions w/o using c extentions by diotalevi
in thread c fucntions w/o using c extentions by opensourcer

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.