DS代码编译错误汇总

来源:互联网 发布:优客李林 知乎 编辑:程序博客网 时间:2024/06/10 20:03

在开发DS应用的时候, 经常会遇到很多莫明其妙的编译错误, 这里根据个人经验进行汇总备查:


1. error LNK2001: unresolved external symbol _CLSID_xxxx ....

解决方法: 在使用CLSID_xxx的cpp文件中加入:

#include <InitGuid.h>


2. error LNK2019: unresolved external symbol "void __stdcall DbgAssert

出错原因: 与BaseClasses工程的编译选项不同

解决方法: 检查两个工程Project Properties -> Configuration Properties -> General -> Project Defaults.

例如: 使用相同的Character Set: Unicode


3. error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function

出错原因: 缺少必要的库文件 winmm.lib

解决方法: 在工程Project Properties -> Configuration Properties ->Linker -> Input -> Additional Dependencies 中增加winmm.lib

 

 

原创粉丝点击