エラーは言う:
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;