logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Bcompiler functions of new release: msg#00169

Subject: Re: Bcompiler functions of new release
Hello kioto,

Sunday, February 20, 2005, 12:51:48 PM, you wrote:

k> I have read about the new features that it's possible write the whole
k> files and create an executable file.
k> I believe that you have added new functions. What is the the function to 
k> use for my scope.
        writing the whole .php file is not a problem now with
bcompiler_write_file(). but creating a self-executable bytecode file is
not an easy thing now...
        you should look at the following page first:
http://www.php.net/manual/en/function.bcompiler-write-exe-footer.php

        then, you should be prepared to necessity of building a stub (php
embed executable) by yourself since this part is not automated enough. you can
find a sample stub source (phpe.c) in the bcompiler/examples/embed. feel free
to change the php code inside (you can call main() function instead of
main::main() method, for example).

        at last, you can try to build the self-executable bytecode file,
which consists of three parts: 1) the stub; 2) the bytecodes; 3) the
bcompiler exe_footer. example in the manual is a valid one, working for me
on win32.
        please note, that you can't for the moment use bcompiler_write_file()
for self-executables, so you can only write functions, constants and classes.
unfortunately, this part of bcompiler isn't tested well, i managed to make
self-executables on win32, but now an attempt to make it on freebsd failed.
but don't give up :) don't hesitate to send me a mail if you still have
problems with following the above-mentioned steps


-- 
Best regards,
 val                            mailto:val@xxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>