Thread overview | |||||
---|---|---|---|---|---|
|
August 18, 2002 Problem with DM Build | ||||
---|---|---|---|---|
| ||||
I am new to DM so I am trying an easy programe. #include <stdio.h> int main(void) { printf("This is a short C programme."); return 0; } This compiles and runs in the DOS command window. However when I run DM it compiles OK but when I try to build it keeps giving me the following error. link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512 @tst.LNK Error: c:\dm\lib\SNN.lib(winstart) : Symbol Undefined _WinMain@16 Errors: 1 Warnings: 0 Build failed I am running DM on XP. Has anybody got an answer. |
August 18, 2002 Re: Problem with DM Build | ||||
---|---|---|---|---|
| ||||
Posted in reply to john russell | Are you using the IDDE?
The problem is you are linking the program as a GUI program which means that
your main entry point would be WinMain, not main!
If you want this to work, you should remove the /ENTRY:WinMainCRTStartup part
from the Link command line. In the IDDE you do this by selecting "Console" as
target.
john russell wrote:
> I am new to DM so I am trying an easy programe.
>
> #include <stdio.h>
>
> int main(void)
> {
> printf("This is a short C programme.");
>
> return 0;
>
> }
>
> This compiles and runs in the DOS command window. However when I run DM it compiles OK but when I try to build it keeps giving me the following error.
>
> link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512
> @tst.LNK
> Error: c:\dm\lib\SNN.lib(winstart) : Symbol Undefined _WinMain@16
> Errors: 1 Warnings: 0
> Build failed
>
> I am running DM on XP. Has anybody got an answer.
|
August 19, 2002 Re: Problem with DM Build | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | Thanks it builds now. "Jan Knepper" <jan@smartsoft.cc> wrote in message news:3D5FC49F.ACDA3512@smartsoft.cc... > Are you using the IDDE? > The problem is you are linking the program as a GUI program which means that > your main entry point would be WinMain, not main! > If you want this to work, you should remove the /ENTRY:WinMainCRTStartup part > from the Link command line. In the IDDE you do this by selecting "Console" as > target. > > > > john russell wrote: > > > I am new to DM so I am trying an easy programe. > > > > #include <stdio.h> > > > > int main(void) > > { > > printf("This is a short C programme."); > > > > return 0; > > > > } > > > > This compiles and runs in the DOS command window. However when I run DM it > > compiles OK but when I try to build it keeps giving me the following error. > > > > link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512 > > @tst.LNK > > Error: c:\dm\lib\SNN.lib(winstart) : Symbol Undefined _WinMain@16 > > Errors: 1 Warnings: 0 > > Build failed > > > > I am running DM on XP. Has anybody got an answer. > |
Copyright © 1999-2021 by the D Language Foundation