Skip to content

Commit 43bea35

Browse files
nnethercoteLegNeato
authored andcommitted
Document a PATH problem on Windows.
This showed up in #220 and #327.
1 parent 9bafe73 commit 43bea35

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

guide/src/guide/getting_started.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,24 @@ There are two ways to build and run this example: natively, and with docker.
276276

277277
### Native
278278

279-
If you have all the required libraries installed, try building with `cargo build`. If you get an
280-
error "libnvvm.so.4: cannot open shared object file", you will need to adjust `LD_LIBRARY_PATH`,
281-
something like this:
279+
If you have all the required libraries installed, try building with `cargo build`.
280+
281+
If you get an error "libnvvm.so.4: cannot open shared object file", you will need to adjust
282+
`LD_LIBRARY_PATH`, something like this:
282283
```
283284
export LD_LIBRARY_PATH="/usr/local/cuda/nvvm/lib64:${LD_LIBRARY_PATH}"
284285
```
286+
287+
If you get an error "error: couldn't load codegen backend" on Windows, you will need to adjust
288+
`PATH`, something like this with CUDA 12:
289+
```
290+
$env:PATH += ";C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\nvvm\bin"
291+
```
292+
or this with CUDA 13:
293+
```
294+
$env:PATH += ";C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\nvvm\bin\x64"
295+
```
296+
285297
You should then be able to `cargo run`, and see the expected output:
286298
```
287299
c = [3.0, 5.0, 7.0, 9.0]

0 commit comments

Comments
 (0)