visual studio linker errors solution

Explanation of the ILLUSION. int main(int argc, char *argv[]) You probably need to set Project->properties->linker->system->subsystem to CONSOLE If you have an INCOMPATIBLE NON STANDARD C++ main; breaking all the standards in the book; such as the Microsoft veriety then set the same subsystem property to WINDOWS THE ERRORs if you SET subsystem to CONSOLE is: MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup OR THE ERROR if you SET subsystem to WINDOWS is: MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup The error means you do not have the main visible to the the linker. But you are editing the file with main or WinMain in the VS Editor, so what is wrong? Visual Studio can be used as a stand alone editor giving you the illusion that the stuff you are editing can and should be compilable. So the solution is simple you failed to add the file you are editing to the project. Right click on solution name->Add->Existing Item->file with main Ctl-shift-B and it compiles Hello World. SOLVED BUT MICROSOFT NEED TO ADD AN INTELLIGENT LOOK AND SEE WHAT THE DEVELOPER HAS IN HIS EDIT SCREENs. USER CONTEXT IS VITAL FOR SMART ERROR MESSAGES - TOTALLY ABSENT IS ANY SMART ERROR MESSAGE IN THE OUTPUT FROM THE COMPILER AND LINKER.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值