Mail Archives: djgpp/1997/10/07/23:55:35
I want to do Win32 programming using DJGPP, so I downloaded RSXNTDJ
1.3.1 and installed it according to its installation guidance.
Using "gcc -Zwin32 test.c -o test.exe", I can compile and link and
run the following test program successfully.
/* test.c */
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE
hPrevInstance, LPSTRlpCmdLine, int nCmdShow)
{
MessageBox (NULL, "Hello Win32", "First App", MB_OK);
return 0;
}
But, for the non-Win32 file x.c below,
/* x.c */
int x()
{
/* empty */
}
I use "gcc -o x.exe x.c" to compile and link it. It weirdly gives
no error message and generates the executable x.exe. Surely, this is
wrong, for there is no main() at all.
Can anyone give me an explanation?
Thanks in advance.
P.H. Tan
- Raw text -