« Return to Thread: swig and php

Re: swig and php

by Paul Lowman :: Rate this Message:

Reply to Author | View in Thread

Olly Betts wrote:
 > On 2008-04-30, Paul Lowman <paul_lowman@...> wrote:
 >> g++ -c -fpic   example.cxx example_wrap.cxx  -I/usr/include/php
-I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend
-I/usr/include/php/ext -I/usr/include/php/ext/date/lib
 >> example_wrap.cxx:981: error: 'zend_property_reference' was not
declared in this scope
 >
 > SWIG is generating code for PHP4 (since you specified "-php4" in the
 > command line), but this error suggests you are using PHP5.  If you want
 > code which works with PHP5, use "-php5" instead!
 >
 > Cheers,
 >     Olly
 >

That helped - it now compiles but unless I remove the %newobject line in
example.i no code appears in example.php for the factory method. Even
then - either way - I get -

Fatal error: Call to a member function area() on a non-object in
/usr/src/swig-1.3.35/Examples/php4/shadow/runme.php4 on line 13

This is the problem I cannot resolve - how do I get php to see the
returned resource as an instance of a class?

This apparently worked OK in php4 so what are the relevent changes?

TIA

Paul Lowman

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

 « Return to Thread: swig and php

LightInTheBox - Buy quality products at wholesale price