NVIDIA / optix-toolkit

Set of utilities supporting workflows common in GPU raytracing applications
BSD 3-Clause "New" or "Revised" License
90 stars 15 forks source link

Issue with building PyOptiX binding on Windows #7

Open wch0x01 opened 1 year ago

wch0x01 commented 1 year ago

In order to build the optix Python module correctly on Windows, please modify target_link_libraries Change CUDA::cuda_driver to CUDA::cudart https://github.com/NVIDIA/optix-toolkit/blob/master/PyOptiX/optix/CMakeLists.txt#L42-L45

Otherwise this error occurs: main.obj : error LNK2001: unresolved external symbol cudaFree

I used a conda environment to set things up before building. https://github.com/NVIDIA/optix-toolkit/tree/master/PyOptiX#conda-environment

My environment: OptiX SDK 7.5.0 CUDA Toolkit 11.8 CMake 3.24.2 Windows 10 Enterprise 21H2 64 bit Visual Studio 2019