dchip is a D2 port of the Chipmunk2D physics library for 2D games
Sergei Nosov
sergei.nosov at gmail.com
Tue Nov 5 20:47:25 PST 2013
On Tuesday, 5 November 2013 at 15:43:29 UTC, Andrej Mitrovic
wrote:
> On 11/5/13, Sergei Nosov <sergei.nosov at gmail.com> wrote:
>> Here's a little bug report. Don't know if it's my bad.
>
> It's not your fault. And thanks for the report!
>
>> First-off, it complained about several 'cannot cast ulong to
>> int'. I've fixed that with explicit casts.
>
> This is mostly the cause of the old C code which compiled
> without
> warnings. I've fixed this now.
>
>> Second, it complained about undefined reference to dlopen and
>> friends. I've fixed that by adding
>> "libs": [
>> "dl"
>> ]
>> to package.json
>
> I've added it as a Posix flag, however do note that I still
> don't know
> whether the demo will work on Posix since I don't know how to
> load the
> glu library there. I'll have to investigate this in a virtual
> machine
> later.
>
>> And finally, I've got
>> object.Exception at src/rt/minfo.d(243): Aborting: Cycle detected
>> between modules with ctors/dtors:
>> dchip.cpPolyShape -> dchip.chipmunk_private -> dchip.cpArbiter
>> ->
>> dchip.cpSpace -> dchip.cpSpaceStep -> dchip.cpCollision ->
>> dchip.cpPolyShape
>
> I was afraid this was going to happen. As it stands D's module
> constructors are almost completely useless for real world code
> since
> this issue always pops up. Anyway I've replaced them with a
> single
> module constructor which calls initialization functions, so
> this is
> fixed now.
>
> Thanks again for all the reports! And if you have new ones
> please do
> report them on the githup page, in the Issues section. Cheers.
It seems to work now! I've send you a little pull request fixing
glu loading on my Ubuntu setup.
More information about the Digitalmars-d-announce
mailing list