c++ - DirectX:空样本编译错误
问题描述
问候我正在尝试使用 Visual Studio 2017 构建 Direct3D 9 的空项目,该项目可在示例浏览器中找到。
我下载了整个项目文件并使用 VS2017 编译了项目,但在这一行出现了一个错误
严重性代码描述项目文件行抑制状态错误 C2668'abs':对重载函数 EmptyProject c:\users\myid\desktop\direct3d_source\emptyproject\dxut\core\dxutenum.cpp 的模糊调用 3975
代码如下
float fCurRanking = abs( float( displayMode.RefreshRate.Numerator ) / fDenom1 -
float( refreshRateMatch.Numerator ) / fDenom2 );
为了消除模棱两可的函数调用,我使用了转换运算符,例如 (int) 或 (long)。
(想使用 float 或 double cast 函数但会带来语法错误)
但我刚刚收到这些错误
严重性代码 描述 项目文件行抑制状态错误 LNK1120 1 未解析的外部 EmptyProject C:\Users\myid\Desktop\EmptyProject\Debug\EmptyProject.exe 1
错误 LNK2019 未解析的外部符号 __vsnwprintf 在函数“long __stdcall StringVPrintfWorkerW(unsigned short *,unsigned int,unsigned int *,unsigned short const *,char *)”中引用 (?StringVPrintfWorkerW@@YGJPAGIPAIPBGPAD@Z) EmptyProject C:\Users\myid \Desktop\EmptyProject\dxerr.lib(dxerrw.obj) 1
如何处理?我阅读了 LNK1120、LNK2019 页面,但不知道确切的错误在哪里
解决方案
推荐阅读
- reactjs - 在服务器端(nextjs/apiRoutes)使用firebase/firestore获取多个数据=问题=>在数据准备好之前输出
- ajax - WP_Query 在插件 WP_AJAX 中不起作用
- csv - 使用批处理文件将字段标题插入 CSV
- python - 如何处理不平衡的类?
- javascript - webpack 排除属性与 webpack-node-externals 包
- visual-studio-code - VS Code:如何安排可以访问操作系统源的项目?
- c# - 从任务计划程序运行 C# 可执行文件时无法创建和保存 excel 文件
- terraform - 使用尚未由 terraform 创建的资源时如何使用 terraform 远程状态
- java - Wicket:当不再选择复选框时收到通知
- ibm-cloud - Watson Studio 视觉识别中的人脸模型是否已停止使用?