0
Any of these solutions suit me, I first tested a system management code to try to find the name of the gpu and cpu, but give this error to me in visual studio, the compiler seems not to accept clr, and I am using Qt in the project with the compiler msvs2017 64bit.
Gravidade Código Descrição Projeto Arquivo Linha Estado de Supressão
Erro D8016 opções de linha de comando '/clr' e '/EHs' são incompatíveis Denoiser C:\Git\Denoiser-Script\src\cl 1
Another problem is that the proper api of Qt does not identify the cpu name or gpu, I ended up not finding what I wanted. So what would be the solution?
code that I used
using namespace System;
using namespace System::Management;
void printHardwareInfo(String^ HardwareClass, String^ propetyName)
{
ManagementObjectSearcher^ searcher = gcnew ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM" + HardwareClass);
ManagementObjectCollection^ collection = searcher->Get();
for each (ManagementObjectSearcher^ object in collection)
{
Console::WriteLine(object[propetyName]->ToString());
}
}