Search code examples
c++linker-errorscpuid

Link error when using the __cpuid() in <intrin.h>?


The error says:

error LNK2019: unresolved external symbol WinCPUID_Init referenced in function 
"public: static void __cdecl CCapturer::GetCPUVendorId(void)" 
 (?GetCPUVendorId@CCapturer@@SAXXZ)

but it doesn't point out which lib I should add in MSDN _cpuid

How to solve it ?


Solution

  • See my answer to your question here: http://social.msdn.microsoft.com/Forums/vstudio/en-US/b80068ac-e17b-4f21-85fd-1d87fdc9b6b6/link-error-when-using-the-cpuid-in-intrinh?forum=msbuild