The problem is that it is written totally in C++ classes and it static lib cannot be directly included to PB program.
But there is dll wrapper that as it's author said, allows using Box2D from pure C.
Well, I have generated PB interface to that wrapper using it sources, but some functions still requiring classes as arguments and this makes me frustrating for 2 recent days yet.
Seems I need someone much more experienced in PureBasic/C++ and it classes and wrapping them to procedures, to explain how I can deal with such wrapper functions requiring objects as arguments:
Code: Select all
; cb2vec2 here represents CLASS, not even a pointer to class stored inside wrapper
Prototype b2body_getlocalpoint (*cb2body_body, localPoint.cb2vec2, *cb2vec2_outPos)
Prototype b2body_getlocalvector (*cb2body_body, localPoint.cb2vec2, *cb2vec2_outPos)
Also _out.pb is my file with declarations of wrapper functions (it is raw and auto-generated, currently just test version which may be very incorrect)
http://rghost.net/79svZvBpd