While compiling and linking the following simple test.c using: cl.exe test.c in windows 7 console:
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char* args[]){
int i;
i=0;
printf("i=%d",i);
return 0;
}
I got LINK : fatal error LNK1561: entry point must be defined. It compiles without problem, but failed in linking. Also if I change the filename to test.cpp then it works fine. Any idea?