Unresolved externals in C++ when using vectors and find

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 09:02:48

I found another forum post, where somebody seems to have reported the same exact problem that you are having. Please check to see if you have

_DEBUG

defined either in your project settings (under C/C++ -- Preprocessor) or somewhere in your code (or include files).

It looks as if std::vector thinks you are building a debug build, when you are in fact creating a release build.

I hope this helps.

The problem in my case was a Debug configuration with Runtime Library set to Multi-threaded DLL. The fix was to change it to Multi-threaded Debug DLL. The error is gone. Removing _DEBUG macro was also a kind of workaround, by I guess it's not a good idea because you end up with debug build linked to non-debug standard library.

Yonatan Simson

The problem was I had _DEBUG defined in C/C++->Preprocessor. Changing it to NDEBUG solved the problem.

Worked for me with : The problem in my case was a Debug configuration with Runtime Library set to Multi-threaded DLL. The fix was to change it to Multi-threaded Debug DLL

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!