c++ - Problem with DM Build
- "john russell" <joru ukonline.co.uk> Aug 18 2002
- Jan Knepper <jan smartsoft.cc> Aug 18 2002
- "john russell" <joru ukonline.co.uk> Aug 19 2002
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.
Aug 18 2002
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.
Aug 18 2002
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
your main entry point would be WinMain, not main! If you want this to work, you should remove the /ENTRY:WinMainCRTStartup
from the Link command line. In the IDDE you do this by selecting "Console"
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
compiles OK but when I try to build it keeps giving me the following
link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304
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.
Aug 19 2002








"john russell" <joru ukonline.co.uk>