anderslanglands / optix-rs

An oxidized wrapper around NVidia's OptiX raytracing library
15 stars 6 forks source link

Building on Windows #1

Closed GoncaloFDS closed 2 years ago

GoncaloFDS commented 4 years ago

Hi, first of all thank you for maintaining this warper!

I'm trying to compile the given examples on windows and I'm getting the linker error

fatal error LNK1181: cannot open input file 'cudart.lib'

I've added the cuda lib path to the System Path and I get the same error. Do you know what I can do to fix this?

anderslanglands commented 4 years ago

Hello, I'm afraid I've not tried to build this on Windows, so you're venturing into new territory here!

Assuming you've set OPTIX_ROOT and CUDA_ROOT environment variables to point to the root of your optix and cuda installations (which I assume you have otherwise the build script should error out), you might want to check where cuda is putting cudart.lib exactly. The build script expects it in a "lib64" directory, which is where it puts it on linux. If your installation has it somewhere different then you'll need to modify the lines in the build script that set that path, e.g. line 133 in optix/build.rs