How do I make/use my own run-time library?

%u wfunction at hotmail.com
Tue Jan 4 23:21:38 PST 2011


Hi,

I've gotten rather far with making my own run-time library, and I've gotten pretty
far. The only problem now seems to be this first line in lifetime.d:

extern (C) void[] _d_arrayappendT(TypeInfo ti, Array *px, byte[] y)
{
    size_t offset = px.data - __arrayStart(info);
    //...
}

For some weird reason, I'm getting an offset of 0xFFFFFFF0, because px.data is 0
and __arrayStart(info) is 16.

Does anyone have an idea why this might happen?
Things I've changed: I've basically unlinked from most of SNN.lib except a very
few object files I've extracted from it. Might the lack of anything in there cause
this?

If I manage to get the code working well, I'll definitely try to share it, since
it lets you link dynamically to msvcrt.dll instead of statically to snn.lib -- and
I think people will like that. :)

Thank you!


More information about the Digitalmars-d mailing list