1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

Discussion in 'C++' started by ayabrego, Jun 26, 2010.

  1. ayabrego

    ayabrego New Member

    Joined:
    Jun 26, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello there guys,

    This is my first post obviously. I am having a slight problem with Microsoft visual c++ express because I dont think its my code. here is my code.

    Code:
    #include <iostream>
    using namespace std;
    int main(){
    	cout << "hello world";
    	return 0;
    }
    and when I compile it this is what shows.


    1>------ Build started: Project: Programexp, Configuration: Debug Win32 ------
    1> main.cpp
    1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
    1>C:\Users\Aaron\documents\visual studio 2010\Projects\Programexp\Debug\Programexp.exe : fatal error LNK1120: 1 unresolved externals

    Any help guys I am running windows 7 by the way.
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    1
    Trophy Points:
    0
    The issue is not with compiler but the issue is with your settings to link the right object file and instead of doing the tweaking with the linking of object file in the build configuation try creating a new Win32 Application project.

    Remember Win32 Application Console based project.
     

Share This Page