C++ 在<;中使用_cpuid()时出现链接错误;intrin.h>;?

C++ 在<;中使用_cpuid()时出现链接错误;intrin.h>;?,c++,linker-errors,cpuid,C++,Linker Errors,Cpuid,错误显示: error LNK2019: unresolved external symbol WinCPUID_Init referenced in function "public: static void __cdecl CCapturer::GetCPUVendorId(void)" (?GetCPUVendorId@CCapturer@@SAXXZ) 但它没有指出我应该在MSDN中添加哪个库 如何解决它?显然,fddshow试用安装程序也使用了它(我不知道那是什么),并且在Wi

错误显示:

error LNK2019: unresolved external symbol WinCPUID_Init referenced in function 
"public: static void __cdecl CCapturer::GetCPUVendorId(void)" 
 (?GetCPUVendorId@CCapturer@@SAXXZ)
但它没有指出我应该在MSDN中添加哪个库


如何解决它?

显然,fddshow试用安装程序也使用了它(我不知道那是什么),并且在
WinCPUID.dll

external     'WinCPUID_Init@files:WinCPUID.dll cdecl';
我在这里找到了WinCPUID_Init符号的匹配项:

代码头说

// The script is taken from the ffdshow-tryouts installer
// http://sourceforge.net/projects/ffdshow-tryout/
后来

// functions to detect CPU
function WinCPUID_Init(msGetFrequency: Integer; var pInfo: TCPUInfo): Integer;
external     'WinCPUID_Init@files:WinCPUID.dll cdecl';
// function to get system information
procedure GetSystemInfo(var lpSystemInfo: TSystemInfo); external 'GetSystemInfo@kernel32.dll stdcall';


procedure CPUCheck();
var
  CPUInfo: TCPUInfo;
begin
  WinCPUID_Init(0, CPUInfo);

  if (CPUInfo.bIsInitialized = 0) then begin
    // something went wrong
  end
  else begin
    if (CPUInfo.bSSE_Supported  = 1) then begin
      cpu_sse  := true;
    end;
    if (CPUInfo.bSSE2_Supported = 1) then begin
      cpu_sse2 := true;
    end;
  end;
end;

在这里查看我对您问题的回答:

请显示声明和调用
CCapturer::GetCPUVendorId
声明公共:静态无效GetCPUVendorId();定义void CCapturer::GetCPUVendorId(){…};调用CCapturer::GetCPUVendorId()这是函数的定义,我认为问题在于调用。你能证明一下吗?@christopher,拜托,不要在评论中为你的问题发布额外的信息,把它们放在问题本身中。它既不可读,也对任何人都没有帮助。