Reggie Kogulan wrote: > Aaron, > What I am looking is to distribute the executable only. Not the code. like > a compiled C program will generates a.out or jar file in java. Thats all I > am looking for. > > Someone earlier said to use perlcc. Which I did now. I do not see an > executable file. > > example: $perlcc -o testfile test.pl > > Did not produce testfile at all. > Is there something else I need to do? >
perlcc is experimental so don't be suprise if it doesn't work. you can generate the c file and compile it yourself (asking for perlcc to generate the c code might be easier then asking it to generate the binary for you). following these steps (assuming your perl script is named script.pl): [panda]$ perlcc -S script.pl [panda]$ perl -MConfig -e 'print $Config{cc}\n"' [panda]$ perl -MExtUtils::Embed -e ccopts -e ldopts [panda]$ gcc -o script.out script.c <options from above> [panda]$ file script.out [panda]$ script.out steps: 1. ask perlcc to generate a script.c file from script.pl 2. ask Config to show us what compiler is Perl itself compiled into. You will need to use the same complier! in my box, it's a gcc 3. Ask ExtUtil to show us what options Perl itself is compiled into. this will print long option line so you will probably want to '> options.txt' 4. use gcc to compile script.c into a binary script.out. '<options from above>' means whatever you store into options.txt in step 3. without the options, gcc probably won't compile correctly. 5. simply shows you that you really end up with a binary for your os 6. runs it. if you are having problem compiling the c source, it's probably due to missing headers, use the following to find out where those headers such as EXTERN.h and perl.h are really locaed: [panda]$ perl -MConfig -e 'print "$Config{archlib}\n"' i have been using this method to generate some simply perl binaries for fun. if that doesn't work for you, forget you ever heard perlcc. :-) david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]