关于/ENTRY (Entry-Point Symbol)

  • The /ENTRY option specifies an entry point function as the starting address for an .exe file or DLL.
  • By default, the starting address is a function name from the C run-time library. The linker selects it according to the attributes of the program, as shown in the following table.
  • 关于VS2005:LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    • 建一CUI程序
    • Use Unicode Character Set
    • Entry Point :wmain
    • Rebuild则出现上述错误,奇怪的是错误提示_main没有定义,而不是_wmain??
    • 估计原因:默认情况下,linker通过Character set和SubSystem选择entry point function(见上表),再链接我们定义的入口函数(_main(_wmain)或WinMain(wWinMain))。现改变了Entry Point,则linker默认链接_main函数,无法找到,故错误提示。
    • 若重新定义一main函数或修改Character set为Use Multi-Byte Character Set,则会链接成功。

转载于:https://www.cnblogs.com/dahai/archive/2011/08/09/2131776.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值