Ошибка ссылки при использовании __cpuid () в & lt; intrin.h & gt ;?

Ошибка говорит:

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

но это не указывает, какую библиотеку я должен добавить в MSDN _cpuid

Как это решить?

-1

Решение

Другие решения

Видимо, он также использовался установщиком 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;
0

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector