错误说:
error LNK2019: unresolved external symbol WinCPUID_Init referenced in function
"public: static void __cdecl CCapturer::GetCPUVendorId(void)"
(?GetCPUVendorId@CCapturer@@SAXXZ)
但它没有指出我应该在 MSDN _cpuid中添加哪个库
如何解决?
错误说:
error LNK2019: unresolved external symbol WinCPUID_Init referenced in function
"public: static void __cdecl CCapturer::GetCPUVendorId(void)"
(?GetCPUVendorId@CCapturer@@SAXXZ)
但它没有指出我应该在 MSDN _cpuid中添加哪个库
如何解决?
显然它也被 fddshow-tryout 安装程序使用(我不知道那是什么)并且在WinCPUID.dll
external 'WinCPUID_Init@files:WinCPUID.dll cdecl';
我在这里找到了 WinCPUID_Init 符号的匹配项:
http://code.google.com/p/notepad2-mod/source/browse/branches/inno/distrib/cpu_detection.iss?r=616
代码头说
// 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;
在此处查看我对您的问题的回答:http: //social.msdn.microsoft.com/Forums/vstudio/en-US/b80068ac-e17b-4f21-85fd-1d87fdc9b6b6/link-error-when-using-the-cpuid- in-intrinh?forum=msbuild