Hi, um, Kartik?

I worked with XS++ before, and I can tell you that the author (steffen) is very helpful.


a few pointers:


I don't think that you want to use the %file directive. it redirect the output of XS++, while you probably wanted to just include the file. if it is true, then just #include the file, like you would have done in a C++ file.


there is no 'public' statment in an xsp file. whatever is there is public by definition.


you have two constructors for the class. one of them need a new name.


float32 is just normal float, right? why not use it, and let XS++ use the default float handling?


that is all I can think about right now. please try and see if it makes any difference.


Shmuel.


On 2011/04/27 0:02, Kartik Thakore wrote:

Hi,

I am trying to bind Box2D to Perl using XSpp. This is my code so far:
https://github.com/PerlGameDev/Box2D-perl

I am using Module::Build::WithXSpp and ExtUtils::XSpp. The first thing I
need to bind are a bunch of C++ style structs (not pure C struct).

http://paste.scsys.co.uk/99657

It has operator overloads and so on.

The ExtUtils::XSpp is not clear on how I should handle this. I tried
doing

https://github.com/PerlGameDev/Box2D-perl/blob/master/xsp/Box2D.xsp

but when I compile and run I get:


Building Box2D
Generating main XS file...
Error: line 7 (Current token type: 'OPCURLY') (Current value: '{') Buffer: "
"
Expecting: ('OPPAR')
Error reading from pipe '/home/kthakore/.perl5/perls/perl-5.12.2/bin/perl5.12.2 
-MExtUtils::XSpp::Cmd -e xspp --  
/home/kthakore/Documents/Development/Box2D-perl/Box2D/xsp/Box2D.xsp':  in 
main.xs, line 22


Any help will be appreciated.

Regards,

Reply via email to