FLTK2 bindings for D
unknown
sphinski at netscape.net
Mon Aug 21 11:24:16 PDT 2006
Ok,
so I removed templates out from irrlicht, not too many was there...
Now, compiling all the cc files, maybe this is a bug. For example
aabbox3d.cc
g++ -c bcd/irrlicht/aabbox3d.cc -o bcd/irrlicht/aabbox3d.cc.o
bcd/irrlicht/aabbox3d.cc:81: error: ‘core’ has not been declared
bcd/irrlicht/aabbox3d.cc:81: error: use of enum EIntersectionRelation3D’
without previous declaration
The line in aabbox3d.cc is:
enum core::EIntersectionRelation3D
_BCD__ZNK3irr4core9aabbox3df21classifyPlaneRelationERKNS0_8plane3dfE(irr::core::aabbox3df
*This, irr::core::plane3df const & plane) {
return (This->classifyPlaneRelation(plane));
}
enum EIntersectionRelation3D is from plane3d.h:
namespace irr
{
namespace core
{
//! Enumeration for intersection relations of 3d objects
enum EIntersectionRelation3D
{
ISREL3D_FRONT = 0,
ISREL3D_BACK,
ISREL3D_PLANAR,
ISREL3D_SPANNING,
ISREL3D_CLIPPED
};
...
So the problem is I think that bcdgen should write all namespaces,
irr::core:: instead of core::
BELOW
enum irr::core::EIntersectionRelation3D
_BCD__ZNK3irr4core9aabbox3df21classifyPlaneRelationERKNS0_8plane3dfE(irr::core::aabbox3df
*This, irr::core::plane3df const & plane) {
return (This->classifyPlaneRelation(plane));
}
I can fix them manually then it compiles, but maybe this is simple bug
to fix?
Thanks
unknown kirjoitti:
> Hi!
>
> I try to work on Irrlicht..
>
> So I got all files generated, except one not important I could exclude
> (propably much more files could be excluded)
>
> But then for example vecror3d is template class so it needs to be worked
> on.. so I add option -Tvector3d to the command, which is now:
> ./bcdgen $1/${i}.h irrlicht -I/home/me/D/bcd/irrlicht-1.1/include/ -r -E
> -P -DV -Tvector3d -Tvector2d
>
> Get output:
> vector2d
> In file included from <command line>:88:
> bcd/irrlicht/template_D.h:3: error: 'vector3d' is used as a type, but is
> not defined as a type.
> bcd/irrlicht/template_D.h:4: error: 'vector2d' is used as a type, but is
> not defined as a type.
> vector3d
> In file included from <command line>:88:
> bcd/irrlicht/template_D.h:3: error: 'vector3d' is used as a type, but is
> not defined as a type.
> bcd/irrlicht/template_D.h:4: error: 'vector2d' is used as a type, but is
> not defined as a type.
>
>
> template_d.h:
> #include "../bind.h"
> #include "/home/me/D/bcd/irrlicht-1.1/include/vector3d.h"
> vector3d<DReflectedClass> __IGNORE_vector3d;
> vector2d<DReflectedClass> __IGNORE_vector2d;
>
> Also template_D.h seems to be regenerated for every header, so it
> includes only vector3d.h.. I am not very experienced..
>
> maybe better idea to remove templates by duplicating the template class
> to two separate classes vector3df and vector3di? They are typedefed
> anyway there..
> typedef vector3d<f32> vector3df;
> typedef vector3d<s32> vector3di;
>
> Thanks.
>
> Gregor Richards kirjoitti:
>> I made an attempt at OGRE, which was unfortunately not very
>> successful, because OGRE makes heavy use of the STL :(
>>
>> - Gregor Richards
>>
>>
>> unknown wrote:
>>> Hi!
>>>
>>> I do not think it is competing too much. Native gui is necessary and
>>> important for D to collect momentum. Momentum brings more native work.
>>>
>>> But seems many ports to native D are started and then cancelled (no
>>> time, no interest, no people), so I see bcd very necessary.
>>>
>>> I did not know bcd. I am interested if binding to 3d engine like
>>> Irrlich, Ogre or similar could be generated. I might give it a try.
>>>
>>>
>>>
>>> Gregor Richards kirjoitti:
>>>
>>>> I hate to compete with the far more compelling FLTK-port-to-D
>>>> thread, but I don't think many people know about this, and it's
>>>> definitely useful. There are FLTK2 bindings in D, autogenerated by
>>>> bcd.gen ( http://www.dsource.org/projects/bcd/ ). Since they're
>>>> generated automatically, they have very nearly the exact same API as
>>>> the native C++ ones, PLUS they're easy to keep up to date (if they
>>>> become incompatible, I can just run the script again and bring them
>>>> up to date).
>>>>
>>>> They're available in SVN, info on checking them out is on the BCD
>>>> web page ( http://www.dsource.org/projects/bcd/ ).
>>>>
>>>> Finally: These bindings have been partially but not completely
>>>> tested. If you find a problem, it can probably be solved quite
>>>> easily, in most cases it's a discrepancy between the FLTK2 .h files
>>>> and .cxx files (naughty naughty). Just tell me by some means (NG,
>>>> email, whatever).
>>>>
>>>> - Gregor Richards
More information about the Digitalmars-d-dwt
mailing list