I added the includes and references of NVMAPI-Main folder and I added the reference folder of amd64 for my 64 bit machine. it displays thousands of compile errors C2059 on NVAPI_INTERFACE . There are 0 instructions on how to setup NVAPI for my IDE
#include "nvapi.h"
#include "NvApiDriverSettings.h"
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#pragma comment(lib, "nvapi64.lib")
int main()
{
std::cout << "Hello World!\n";
}Activity
3Don't know if you still need this or if it'll work, but maybe it will help you or someone else. According to a post on Stack Overflow the compile errors may be fixed by manually including "Windows.h" in "nvapi.h". (which worked for me) As for setting up the project in Visual Studio 2022 Community, make sure Additional Include Directories (under Config Properties, C/C++, General) points to the root folder of the NvAPI library. (ex: C:\Users\user\Documents\Visual Studio 2022\Libraries\R560-developer) Then set Platform to x86/Win32 and in Linker, General, add the folder containing "nvapi.lib" to Additional Library Directories. (ex: C:\Users\user\Documents\Visual Studio 2022\Libraries\R560-developer\x86) Then do the same with the Platform set to x64 but change it to the folder containing "nvapi64.lib". Then in Linker, Input, add "nvapi.lib" to additional dependecies with platform set to x86, and add "nvapi64.lib" to the same place but with platform set to x64.
for more reference view this https://github.com/verybigbadboy/NVAPI-example.git
Please forgive my lack of formatting and clarity
If you read I was trying to compile for arm64 as NVIDIA does support microsoft surface's and any arm64 CPU. x86 will technically should still run on it but there are not any instructions for if arm64 drivers are used instead of x86. Like a video would be helpful for x64, x86 and arm64. or even a PDF file
Ah, I misread "reference folder of amd64" and thought you were compiling for amd64. I apologize.
Don't know if you still need this or if it'll work, but maybe it will help you or someone else. According to a post on Stack Overflow the compile errors may be fixed by manually including "Windows.h" in "nvapi.h". (which worked for me) As for setting up the project in Visual Studio 2022 Community, make sure Additional Include Directories (under Config Properties, C/C++, General) points to the root folder of the NvAPI library. (ex: C:\Users\user\Documents\Visual Studio 2022\Libraries\R560-developer) Then set Platform to x86/Win32 and in Linker, General, add the folder containing "nvapi.lib" to Additional Library Directories. (ex: C:\Users\user\Documents\Visual Studio 2022\Libraries\R560-developer\x86) Then do the same with the Platform set to x64 but change it to the folder containing "nvapi64.lib". Then in Linker, Input, add "nvapi.lib" to additional dependecies with platform set to x86, and add "nvapi64.lib" to the same place but with platform set to x64.
for more reference view this https://github.com/verybigbadboy/NVAPI-example.git
Please forgive my lack of formatting and clarity