D - Dernel: _moduleCtor not working correct?
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (10/10) Feb 24 2004 Hi, I'm using static ctors with classes, so that some stuff is construct...
- Marko Nikolic (9/16) Feb 24 2004 Yes you can (mix normal and static ones) and it works for me. Did
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (9/15) Feb 24 2004 Hi, no. What's this function for? I have to look it up.
- Marko Nikolic (8/24) Feb 24 2004 No, I mean I have to include them on dmd command line as .d or .obj
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (4/8) Feb 25 2004 This seems to be very windows specific to me. I'm using the Linux DMD
Hi, I'm using static ctors with classes, so that some stuff is constructed before anything else uses it. Because I don't have the normal startup code in my D kernel, I'm calling _moduleCtor myself. But it seems that nothing happens. Is the static ctor functionality not yet implemented? Am I missing something? Can I mix normal ctors and static ones, that's what I do. -- Robert M. Münch Management & IT Freelancer http://www.robertmuench.de
Feb 24 2004
Robert M. Münch wrote:Hi, I'm using static ctors with classes, so that some stuff is constructed before anything else uses it. Because I don't have the normal startup code in my D kernel, I'm calling _moduleCtor myself. But it seems that nothing happens. Is the static ctor functionality not yet implemented? Am I missing something? Can I mix normal ctors and static ones, that's what I do.Yes you can (mix normal and static ones) and it works for me. Did you called _minit() before _moduleCtor? I have problems when making library out of such modules (with static constructor/destructor) when static constructor/destructor are not called. My workaround is to use such modules directly on command line of dmd not in library :( Regards, Marko
Feb 24 2004
On Tue, 24 Feb 2004 14:21:12 +0100, Marko Nikolic <markoni69 verat.net> wrote:Yes you can (mix normal and static ones) and it works for me. Did you called _minit() before _moduleCtor?Hi, no. What's this function for? I have to look it up.I have problems when making library out of such modules (with static constructor/destructor) when static constructor/destructor are not called. My workaround is to use such modules directly on command line of dmd not in library :(?? Not sure if I understood you correctly: You mean that you link such files as object files via the command line instead of using a lib file? -- Robert M. Münch Management & IT Freelancer http://www.robertmuench.de
Feb 24 2004
Robert M. Münch wrote:On Tue, 24 Feb 2004 14:21:12 +0100, Marko Nikolic <markoni69 verat.net> wrote:Have a look at winsamp.d at the samples directory.Yes you can (mix normal and static ones) and it works for me. Did you called _minit() before _moduleCtor?Hi, no. What's this function for? I have to look it up.No, I mean I have to include them on dmd command line as .d or .obj files. If I compile them and make library out of them then static constructors/destructors are not called. Anyway, if you did not call _minit() that could be the cause of the problem. Regards, MarkoI have problems when making library out of such modules (with static constructor/destructor) when static constructor/destructor are not called. My workaround is to use such modules directly on command line of dmd not in library :(?? Not sure if I understood you correctly: You mean that you link such files as object files via the command line instead of using a lib file?
Feb 24 2004
On Tue, 24 Feb 2004 21:54:02 +0100, Marko Nikolic <markoni69 verat.net> wrote:Yes you can (mix normal and static ones) and it works for me. Did you called _minit() before _moduleCtor?Hi, no. What's this function for? I have to look it up.Have a look at winsamp.d at the samples directory.This seems to be very windows specific to me. I'm using the Linux DMD version for Dernel. Looks like this doesn't solve my problem. Robert
Feb 25 2004