NO

Author Topic: Whats Wrong?  (Read 3617 times)

Frozen

  • Guest
Whats Wrong?
« on: September 10, 2007, 04:01:28 PM »
I started to learn C but I have a problem...
Whats Wrong???

/* Das Hello-World-Programm */

#include <stdio.h>

int main()
{
   printf("Hello World!\n") ;

   return 0;
}


POLINK: error: Unresolved external symbol '_WinMain'.
POLINK: fatal error: 1 unresolved external(s).
*** Fehlercode: 1 ***
« Last Edit: September 10, 2007, 04:09:14 PM by Frozen »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Whats Wrong?
« Reply #1 on: September 10, 2007, 05:38:36 PM »
Select "win32 console program" from the project wizard, or from the menu project options->linker tab select subsystem = console. For a console program entry point is "main".
"WinMain" is the etry point for a GUI program.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide