Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant link with nvml.lib(nvml.dll) with VS2022 #25

Open
pcarret opened this issue Jul 3, 2023 · 2 comments
Open

Cant link with nvml.lib(nvml.dll) with VS2022 #25

pcarret opened this issue Jul 3, 2023 · 2 comments

Comments

@pcarret
Copy link

pcarret commented Jul 3, 2023

Hello,

During compilation with VS2022 of vk_raytrace.exe I ended with an error I can't fix.

\vk_raytrace\out\build\x64-Debug\nvml.lib(nvml.dll) : error LNK2001: symbole externe non résolu __delayLoadHelper2

I tried to add

C:\Program Files\NVIDIA Corporation\NVSMI\nvml.dll
C:\Program Files\NVIDIA Corporation\NVSMI\nvml.lib

I have installed latest CUDA 12.2
https://developer.nvidia.com/gpu-deployment-kit says :
The GPU Deployment Kit is part of the CUDA Toolkit, in versions 8 and later, and is no longer available as a separate download.

I do not know how to proceed

@mklefrancois
Copy link
Collaborator

Hi, there is something unusual in your log, the nvml.lib shouldn't show up in the build directory.
Maybe you could try re-running CMake.

  • Clear the out\build directory
  • cd to the vk_raytrace
  • mkdir build
  • cd build
  • cmake ..

Open the solution and try compiling again.

Note: The nvml DLL is part of the driver and will be store in a path similar to this:

C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_46b941c49f6a5e3e\nvml.dll

@pcarret
Copy link
Author

pcarret commented Jul 4, 2023

Hi @mklefrancois ,

Thanks for your message and your help proposal
I tried to clean buil, rebuild etc.. but nothing worked

I find out that delayimp.lib hold the missing __delayLoadHelper2 symbol
So I tried to add these two lines but without any success

  target_link_libraries(${PROJNAME} debug  "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/lib/x64/delayimp.lib")
  target_link_libraries(${PROJNAME} optimized "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/lib/x64/delayimp.lib")

Is there any way to get the vk_raytrace exe directly and use it from command line ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants