hi,
when I compile this code:
#include <windows.h>
#include <stdio.h>
void main(void)
{
printf("Hello World");
}
I get this error:
D:\Program Files\PellesC\Include\Win\basetsd.h(53): error #2001: Syntax error: expected ';' but found 'INT64'.
D:\Program Files\PellesC\Include\Win\basetsd.h(53): warning #2099: Missing type specifier; assuming 'int'.
D:\Program Files\PellesC\Include\Win\basetsd.h(57): error #2120: Redeclaration of '__int64', previously declared at D:\Program Files\PellesC\Include\Win\basetsd.h(53); expected 'int' but found 'unsigned int'.
D:\Program Files\PellesC\Include\Win\basetsd.h(57): error #2001: Syntax error: expected ';' but found 'UINT64'.
D:\Program Files\PellesC\Include\Win\basetsd.h(57): warning #2099: Missing type specifier; assuming 'int'.
D:\Program Files\PellesC\Include\Win\winnt.h(558): fatal error #1014: #error: "No target architecture".
thanks for your help.
In your project options/compiler ... enable microsoft extensions and pelles c extensions.
Also the correct form for main is .... int main (void) ... and it returns an error code, usually 0 at the end.
#include <stdio.h>
int main (void)
{
printf( "Hello World" );
return 0;
}
Thanks :)