CPU处理时间使用GetProcessTimes和FileTimeToSystemTime不工作在64位赢 [英] CPU Process time using GetProcessTimes and FileTimeToSystemTime do not work in 64 bit win

查看:1150
本文介绍了CPU处理时间使用GetProcessTimes和FileTimeToSystemTime不工作在64位赢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图测量CPU时间。
它在Win 32上运行良好,但在64位,它说:

I am trying to measure CPU time. It works great on Win 32, but on 64 bit, it says:

error LNK2019: unresolved external symbol __imp_GetProcessTimes referenced in function "unsigned int __cdecl getWINTime(void)" (?getWIN32Time@@YAIXZ) 

类似的错误 FileTimeToSystemTime

error LNK2019: unresolved external symbol __imp_FileTimeToSystemTime referenced in function "unsigned int __cdecl getWINTime(void)" (?getWIN32Time@@YAIXZ)

函数本身不是重要的是没有问题。

这是64位架构中的调用是否合法吗?

Function itself is not that important there is no issue with it.
Are this calls legit in 64 bit architecture or what?

这不是唯一的问题像它在64位窗口上不能正确链接到库。

是否有正确链接的设置?

This is not the only issue it seems like its not linking correctly to libraries on 64 bit windows.
Is there a setting I should set for it to link properly?

推荐答案

您是两个环境的构建设置都列出了相同的导入库。这两个函数都在kernel32.dll中。

Do you're build settings for the two environments have the same import libraries listed. Both of those functions are in kernel32.dll.

这篇关于CPU处理时间使用GetProcessTimes和FileTimeToSystemTime不工作在64位赢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆