----- Original Message ----- From: "Karthika Arunkumar" <[EMAIL PROTECTED]> . . > > 2) To grab the XS file and do the changes and place a Makefile.pl alongside > the .pm file > , or, > while using inline::C2XS > Pls can you let me know how to proceed writing a makefile (can I use the > makefile automatically created) and after getting these files,how do I > create the final executable? I tried understanding your solution, in an > other forum too.I am somewhat not clear in that part alone. >
I mean that you need to convert your Inline::CPP functions into a normal perl module. Inline::CPP has provided you with an XS file that you can use (though you may have to chage the "PACKAGE" and "MODULE" entries it contains to match the name of your module). All you then need is a Makefile.PL, a pm file and a test.pl (if you want). Then run, as per normal, 'perl Makefile.PL', 'make test' and 'make install'. You now have a module that does not rely on Inline in any way. And in your script, you make no mention of Inline - you just have "use MyModule;" (or whatever it is that you call your module). Just as pp can handle other modules, it should have no trouble handling "MyModule". Other than that, I would need to see a *simple* demo script that demonstrates the problem you are having. The first approach of sticking the build directory alongside the PAR-built executable should have worked - I don't know why it didn't. Here's what I do: First, a simple Inline::CPPscript (try.pl): ------------------------- use warnings; use Inline CPP => <<'EOC'; void greet() { printf("Hello Worldn"); } EOC greet(); ------------------------- Run 'perl try.pl' - it prints out "Hello World" after compiling. Then build the par executable (it's necessary to pull FindBin in with the -M switch, otherwise it doesn't get loaded - for me, anyway): pp -M FindBin -o try.exe try.pl Then run the try executable - which prints out "Hello World" - since the _Inline directory that houses the Inline-built binaries is in the cwd. Put it all together - here's what happened on my machine: --------------------------------- D:\pscrpt\inline>perl try.pl Hello World D:\pscrpt\inline>pp -M FindBin -o try.exe try.pl D:\pscrpt\inline>try Hello World D:\pscrpt\inline> -------------------------------- So - if it's not working for you , then we need to see a *simple* demonstration of the problem. Cheers, Rob