title: undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status
body: <p>I am using eclipse CDT to test the Intel instructions and below is my program:</p>
  
  <pre><code>#define cpuid(func,ax,bx,cx,dx)\
  __asm__ __volatile__ ("cpuid":\
   "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func));
  int Check_CPU_support_AES()
   {
   unsigned int a,b,c,d;
   cpuid(1, a,b,c,d);
   return (c &amp; 0x2000000);
   }
  </code></pre>
  
  <p>When I compile the above code, I get linkage error as:</p>
  
  <pre><code>Info: Internal Builder is used for build
  gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Intel.o" "..\\src\\Intel.c" 
  gcc -o Intel.exe "src\\Intel.o" 
  c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to `WinMain@16'
  collect2.exe: error: ld returned 1 exit status
  </code></pre>
  
  <p>Please help me regarding the issue.</p>