MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in funct
2015-03-08 18:16
676 查看
编译出现:
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
产生此类问题的原因是:
1. 当程序的main函数是
int main(){}
这样的写法,system 的SubSystem就是/SUBSYSTEM:CONSOLE
2. 当程序的main函数是
int main(int argc, char* argv[]){}
这样的写法,system 的SubSystem就是/SUBSYSTEM:CONSOLE
主要是因为main函数的入口和subsystem不匹配才会出现上面提及的问题。
结论:
当main函数的入口和subsystem不匹配时,一旦编译就会出现如下问题:
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
解决方法:
1、修改main函数
2、重设subsystem参数:
Project -> xxxx Properties -> Configuration Properties -> Linker -> System—>SubSystem
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
产生此类问题的原因是:
1. 当程序的main函数是
int main(){}
这样的写法,system 的SubSystem就是/SUBSYSTEM:CONSOLE
2. 当程序的main函数是
int main(int argc, char* argv[]){}
这样的写法,system 的SubSystem就是/SUBSYSTEM:CONSOLE
主要是因为main函数的入口和subsystem不匹配才会出现上面提及的问题。
结论:
当main函数的入口和subsystem不匹配时,一旦编译就会出现如下问题:
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
解决方法:
1、修改main函数
2、重设subsystem参数:
Project -> xxxx Properties -> Configuration Properties -> Linker -> System—>SubSystem
相关文章推荐
- MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in funct
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tma
- MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in functi
- MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___
- MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 r
- VS2015 MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
- vs2008编译时出现问题解决方法:MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16
- MSVCRT.lib(wcrtexew.obj) : error LNK2019: unresolved external symbol wWinMain referenced in function
- MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main re
- [转]error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- Driver.obj : error LNK2019: unresolved external symbol __except_handler4 referenced in function "lon
- error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- mfc程序报错libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol main referenced in function
- error LNK2019: unresolved external symbol __imp__ func@20 referenced in function..
- error LNK2019:unresolved external symbol *** referenced in function ***的解决方案
- MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
- [转]MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainC
- error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartu