October 12, 2004 Re: Application fails to reach main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant |
>
> You think I might have a main on my lib and don't know about it? what happens if a have a global "int main(int argc, char** argv)"? I'll look to it tonight.
It should fail to link if you have multiple symbols called "main", I think. The "main" we write in D code is mangled to the symbol name "_Dmain" (see src/dmd/mangle.c). The one in dmain2.d is extern (C) so it is left untouched. My guess is there is a WinMain in your lib and that Windows is running that instead of the console "main".
-Ben
|
October 12, 2004 Re: Application fails to reach main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | In article <ckh13e$11cp$1@digitaldaemon.com>, Ben Hinkle says... > > >> >> You think I might have a main on my lib and don't know about it? what happens if a have a global "int main(int argc, char** argv)"? I'll look to it tonight. > >It should fail to link if you have multiple symbols called "main", I think. The "main" we write in D code is mangled to the symbol name "_Dmain" (see src/dmd/mangle.c). The one in dmain2.d is extern (C) so it is left untouched. My guess is there is a WinMain in your lib and that Windows is running that instead of the console "main". > >-Ben I'll look at it. but... shouldn't phobos control WinMain as it does for main? Ant |
October 12, 2004 Re: Application fails to reach main | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | In article <ckh13e$11cp$1@digitaldaemon.com>, Ben Hinkle says... > > >> >> You think I might have a main on my lib and don't know about it? what happens if a have a global "int main(int argc, char** argv)"? I'll look to it tonight. > >It should fail to link if you have multiple symbols called "main", I think. The "main" we write in D code is mangled to the symbol name "_Dmain" (see src/dmd/mangle.c). The one in dmain2.d is extern (C) so it is left untouched. My guess is there is a WinMain in your lib and that Windows is running that instead of the console "main". > Ok, I almost found it: it's a comflict betweem phobos stdio and mine stdio. On the linux version I can use my stdio on windows i cannot. I could figure why. I'll use phobos' for now. on the process I found a few missing private on the import on phobos Ant |
Copyright © 1999-2021 by the D Language Foundation