HELP with this pls : undefined reference to 'WinMain@16'

This is a discussion on HELP with this pls : undefined reference to 'WinMain@16' within the C++ Programming forums, part of the General Programming Boards category; Im new in programing and while I was making the .cpp file to this header: here is the .cpp file: ...

  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    1

    HELP with this pls : undefined reference to 'WinMain@16'

    Im new in programing and while I was making the .cpp file to this header:

    Name:  h.png
Views: 198
Size:  6.7 KB

    here is the .cpp file:

    Name:  cpp.png
Views: 291
Size:  14.2 KB

    i got this error:

    Name:  error winmain.png
Views: 165
Size:  8.2 KB

    What can I do??

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,452
    You forgot to write your global main function.

    By the way, in the future, instead of posting a screenshot of your code, post your code in [code][/code] bbcode tags.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    You created a project of type "Windows Application" - it looks for WinMain function as a start point

    You need to create "Windows Console Application" project - it will have a main function as a start point
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. undefined reference to 'WinMain@16'
    By loopback0 in forum C Programming
    Replies: 5
    Last Post: 03-18-2012, 03:28 PM
  2. 'undefined reference to WinMain@16'
    By lancehumiston in forum C++ Programming
    Replies: 3
    Last Post: 02-29-2012, 08:51 PM
  3. Undefined Reference to 'WinMain@16'
    By Mossypne in forum C Programming
    Replies: 3
    Last Post: 08-04-2010, 07:16 AM
  4. undefined reference to `WinMain@16'
    By Marksman in forum C++ Programming
    Replies: 11
    Last Post: 09-29-2006, 06:32 AM
  5. compile: undefined reference to WinMain@16
    By Xarr in forum C++ Programming
    Replies: 3
    Last Post: 06-08-2004, 01:29 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21