Thread: Compile error - Reference to `WinMain@16'

  1. #1
    Registered User
    Join Date
    May 2004

    Compile error - Reference to `WinMain@16'

    [Linker error] undefined reference to `WinMain@16'

    what is that??? and how can I fix it ?

    I'm using Bloodshed Dev-C++ compiler, and I've included:


  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Newport, South Wales, UK
    Are you making a Windows-based (GUI) or console program? If the former is true, then make sure you have the WinMain entry-point function where you may have int main(...). If not, check your project settings in your IDE.

  3. #3
    Registered User
    Join Date
    May 2004
    I'm making a simple console program where you kan move a symbol (the ASCII smiley guy - int 2 converted)around a black screen using the keyboard... I'll attach the .cpp file and the .h file

  4. #4
    vae victus! skorman00's Avatar
    Join Date
    Nov 2003
    If you're making a console program, you probably won't need <windows.h>. Also, make sure that your program knows it's a console and not a windows app. Since it's looking for "WinMain," it must think that it is a windows app.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C and C++ compile speed
    By swgh in forum A Brief History of
    Replies: 3
    Last Post: 01-02-2007, 02:37 PM
  2. Compile as you type
    By Rocketmagnet in forum A Brief History of
    Replies: 33
    Last Post: 12-07-2006, 01:36 PM
  3. How to compile mfc libs from platform sdk
    By tjcbs in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2006, 08:20 AM
  4. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 09:05 PM
  5. How can I compile C or C++ with Visual Studio .NET?
    By Dakkon in forum C Programming
    Replies: 8
    Last Post: 02-11-2003, 02:58 PM