digitalmars.D.bugs - Application fails to reach main
- Ant (14/14) Oct 08 2004 seems this happend in two separate apps/environments/people.
- Walter (3/5) Oct 08 2004 Perhaps try instrumenting the dmain2.d file in phobos\internal.
- Ant (3/9) Oct 07 2004 thanks, I'll try it.
- Ant (12/18) Oct 11 2004 yeah, I put one printf before each statement on dmain2.
- Ant (5/29) Oct 11 2004 I would try it with dmd 0.101 if I can get it.
- Derek Parnell (10/11) Oct 11 2004 On Mon, 11 Oct 2004 18:25:32 -0400, Ant wrote:
- Ant (5/15) Oct 11 2004 Well, it doesn't work for me.
- Ben Hinkle (4/22) Oct 12 2004 are you sure it is running the right main? Is there a WinMain or somethi...
- Ant (5/35) Oct 12 2004 I'm afraid I'm not sure...
- Ant (5/35) Oct 12 2004 You think I might have a main on my lib and don't know about it?
- Ben Hinkle (6/10) Oct 12 2004 It should fail to link if you have multiple symbols called "main", I thi...
seems this happend in two separate apps/environments/people. only on windows, dmd 0.102 the application fails to reach the main function or any of the static constructors. there is no small example yet. this post is just trying to get the attention of other pleople with the same problem. my application compiles and runs fine on linux. there considerable changes from linux to windows but not on the code directly envolved after commenting out large sections of it. see thread: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11562 Ant
Oct 08 2004
"Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...the application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 08 2004
On Fri, 08 Oct 2004 16:02:24 -0700, Walter wrote:"Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...thanks, I'll try it. Antthe application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 07 2004
On Fri, 08 Oct 2004 16:02:24 -0700, Walter wrote:"Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...yeah, I put one printf before each statement on dmain2. they all show on stdout when compiling phobos through the win32.mak, some before the "success!" some after. they all show when I run a helloworld program, UNLESS I link to my lib, even if the lib if not used at all. in that case nothing is printed out, no messages of errors. any body out there is compiling programs with libs beside phobos? we know that the other example also fails (apollo from Carlos). so seems there is some problem with linking to libs(?) what other tests can I do? Antthe application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 11 2004
On Mon, 11 Oct 2004 18:25:32 -0400, Ant wrote:On Fri, 08 Oct 2004 16:02:24 -0700, Walter wrote:I would try it with dmd 0.101 if I can get it. Of course this might be some problem with my code but I should get some error message. Ant"Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...yeah, I put one printf before each statement on dmain2. they all show on stdout when compiling phobos through the win32.mak, some before the "success!" some after. they all show when I run a helloworld program, UNLESS I link to my lib, even if the lib if not used at all. in that case nothing is printed out, no messages of errors. any body out there is compiling programs with libs beside phobos? we know that the other example also fails (apollo from Carlos). so seems there is some problem with linking to libs(?) what other tests can I do?the application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 11 2004
On Mon, 11 Oct 2004 18:25:32 -0400, Ant wrote: [snip]any body out there is compiling programs with libs beside phobos?Yes, I'm doing that and not having any problems. Win XP system. Libraries that I've created from compiling D source code and using the "dm\bin\lib -c" command. -- Derek Melbourne, Australia 12/10/2004 9:29:07 AM
Oct 11 2004
On Tue, 12 Oct 2004 09:31:13 +1000, Derek Parnell wrote:On Mon, 11 Oct 2004 18:25:32 -0400, Ant wrote: [snip]Well, it doesn't work for me. once again DUI and leds for windows are waiting for the next dmd version. Antany body out there is compiling programs with libs beside phobos?Yes, I'm doing that and not having any problems. Win XP system. Libraries that I've created from compiling D source code and using the "dm\bin\lib -c" command.
Oct 11 2004
"Ant" <duitoolkit yahoo.ca> wrote in message news:pan.2004.10.11.22.25.32.19933 yahoo.ca...On Fri, 08 Oct 2004 16:02:24 -0700, Walter wrote:are you sure it is running the right main? Is there a WinMain or something? It seems odd that just linking will prevent startup from getting to dmain2."Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...yeah, I put one printf before each statement on dmain2. they all show on stdout when compiling phobos through the win32.mak, some before the "success!" some after. they all show when I run a helloworld program, UNLESS I link to my lib, even if the lib if not used at all. in that case nothing is printed out, no messages of errors. any body out there is compiling programs with libs beside phobos? we know that the other example also fails (apollo from Carlos). so seems there is some problem with linking to libs(?) what other tests can I do? Antthe application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 12 2004
In article <ckgs9c$s4t$1 digitaldaemon.com>, Ben Hinkle says..."Ant" <duitoolkit yahoo.ca> wrote in message news:pan.2004.10.11.22.25.32.19933 yahoo.ca...I'm afraid I'm not sure... But, why would it change the main when I link to my lib? How can I be sure? AntOn Fri, 08 Oct 2004 16:02:24 -0700, Walter wrote:are you sure it is running the right main? Is there a WinMain or something? It seems odd that just linking will prevent startup from getting to dmain2."Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...yeah, I put one printf before each statement on dmain2. they all show on stdout when compiling phobos through the win32.mak, some before the "success!" some after. they all show when I run a helloworld program, UNLESS I link to my lib, even if the lib if not used at all. in that case nothing is printed out, no messages of errors. any body out there is compiling programs with libs beside phobos? we know that the other example also fails (apollo from Carlos). so seems there is some problem with linking to libs(?) what other tests can I do? Antthe application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 12 2004
In article <ckgs9c$s4t$1 digitaldaemon.com>, Ben Hinkle says..."Ant" <duitoolkit yahoo.ca> wrote in message news:pan.2004.10.11.22.25.32.19933 yahoo.ca...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. AntOn Fri, 08 Oct 2004 16:02:24 -0700, Walter wrote:are you sure it is running the right main? Is there a WinMain or something? It seems odd that just linking will prevent startup from getting to dmain2."Ant" <Ant_member pathlink.com> wrote in message news:ck679j$1j96$1 digitaldaemon.com...yeah, I put one printf before each statement on dmain2. they all show on stdout when compiling phobos through the win32.mak, some before the "success!" some after. they all show when I run a helloworld program, UNLESS I link to my lib, even if the lib if not used at all. in that case nothing is printed out, no messages of errors. any body out there is compiling programs with libs beside phobos? we know that the other example also fails (apollo from Carlos). so seems there is some problem with linking to libs(?) what other tests can I do? Antthe application fails to reach the main function or any of the static constructors.Perhaps try instrumenting the dmain2.d file in phobos\internal.
Oct 12 2004
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
Oct 12 2004
In article <ckh13e$11cp$1 digitaldaemon.com>, Ben Hinkle says...I'll look at it. but... shouldn't phobos control WinMain as it does for main? AntYou 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
Oct 12 2004
In article <ckh13e$11cp$1 digitaldaemon.com>, Ben Hinkle says...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 AntYou 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".
Oct 12 2004