Debug Assertion Failed!
Program: G:\log\Debug\log.exe
File: dbgheap.c
Line: 1024
Expression: _CrtIsValidHeapPointer(pUserData)
For information on how your program can cause an assertion failuer,
see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
project -> setting -> c/c++ ->Code Generation -> use run-time library (Debug Multithreaded DLL)
XXX.obj : error LNK2001: unresolved external symbol __imp__xxxx
原因:xxxx函数没有导入,应该导入函数所在的lib文件。
解决:在代码中添加 #pragma comment(lib,"XXXX.lib")
XXX.obj : error LNK2001: unresolved external symbol "int __cdecl fun(void)" (?fun@@YAHXZ)
原因:在c++中调用了c的方法或include了c的头文件。
解决:把include c的头文件中添加 修饰extern "C" {}
XXX.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module
解决:ProjectSettings->Link->Category:Input->IgnoreLibraries:XXX.lib
或添加#pragma comment(linker,"/NODEFAULTLIB:XXX.lib")