Jump to content

Hello, im trying to display CPU information such as name and speed of it in C++ using QT. i have followed the guide in this link http://forums.codeguru.com/showthread.php?519933-Windows-SDK-How-to-get-the-processor-frequency and when i try to run it i get this error saying undefined reference to CallNtPowerInformation@20. i checked msdn for this which is this link : https://msdn.microsoft.com/en-us/library/windows/desktop/aa372675(v=vs.85).aspx and all they have VerifyProcessorPowerPolicyAc 20 This information level is not supported which i dnt understand as im pretty new to c++. im using QT creator 5.5, does the code have compatibility issues with QT? if someone could suggest what i should be looking for it would be great help.Thank you.

Link to comment
https://linustechtips.com/topic/851815-what-does-this-error-mean-c/
Share on other sites

Link to post
Share on other sites

2 minutes ago, Unimportant said:

It's a linker error. It compiled but the linker cannot find the implementation of the 'CallNtPowerInformation' function. A quick google search reveals you need to link in the library 'PowrProf.lib'.

do u mean this :


#pragma comment(lib, "Powrprof.lib")

Link to post
Share on other sites

9 minutes ago, Shammikit said:

is this the path that i should refer to ? C:\Qt\Qt5.5.1\5.5\mingw492_32\lib

Don't know where to find that file - I don't run windows. Simply search your harddisk for it. If you don't have it already then it probably comes as part of some SDK you need to install.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×