in reply to Re^2: perl c++ perlembed question
in thread perl c++ perlembed question

thank you for your answer but that does not explain how to call a function from perl that is defined in the c++ code

I thought it did. You use Win32::API (or C::DynaLib) from perl to load/call c functions

or you write your own c++ dispatcher function, and you make it available to perl through xs/Inline::C/pickle.

Replies are listed 'Best First'.
Re^4: perl c++ perlembed question
by eth0nic (Initiate) on Jun 27, 2009 at 16:34 UTC
    i dont want to call JUST ANY c function ... i want to call MY OWN functions that got defined/declared in the code that after declaring those functions embedded the perl script. and i want to access those functions from within the embedded perl script

    i.e.
    blubb.cpp does 2 things ... declaring foobar() and embedding lalala.pl

    now i want to call foobar() from within the embedded lalala.pl

    i really dont know how else i should explain it ... it seems nobody understands me :-(
      Hmm, didn't I just describe that exact scenario?
        didn't I just describe that exact scenario?

        I think you've dealt with a slightly different scenario.
        Both Win32::API and C::DynaLib can load functions from dynamic libraries but, as I (currently) understand it, the op is wanting to load functions from an executable. I don't think those modules can help with that.

        Cheers,
        Rob