MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] referenced in funct

      今天在建工程的时候,无聊的不想用鼠标,直接用键盘操作,估计这一步出错了,导致我后面的编译出现错误

MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] referenced in funct

MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] referenced in funct

本来应该是console application , 我却选择了Windows application  (这就是本质原因,但是出错了也不要紧,百度到了一个很好的博客)

链接如下http://blog.csdn.net/tianyi1991/article/details/44134641

编译出现:
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] 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 [email protected] 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 [email protected] referenced in funct

小问题轻松的解决了,很开心!MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] referenced in funct

MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] referenced in funct

下面继续Shi-Tomasi特征点(角点)检测研究