简体   繁体   中英

visual studio fatal error LNK1120:

just i wanted to make a program using viual stidio 2010 when i do build i have this excaption i just wrote empty main c++ program (no syntax errors)

what i got is:

1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>c:\users\dell\documents\visual studio 2010\Projects\test\Debug\test.exe : 
fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

code is :

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello World" << endl; 
    return 0;
}

please help me to fix it asap thanks ,,

You created a Win32-Project! Make sure that you choose Console Application in the project wizard.

Look at your project property. Just go to project settings, linker settings, then system. Check your subsystem setting.You can change subsystem to "not set".It will link based on which entry point function you have defined.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM