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.
|