Skip to content

Commit

Permalink
add rpath to c++ example
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Jan 16, 2022
1 parent a447b80 commit aea3d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/inference/cxx.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ where `e`, `f` and `v` are predicted energy, force and virial of the system, res

You can compile `infer_water.cpp` using `gcc`:
```sh
gcc infer_water.cpp -D HIGH_PREC -L $deepmd_root/lib -L $tensorflow_root/lib -I $deepmd_root/include -I $tensorflow_root/include -Wl,--no-as-needed -ldeepmd_cc -lstdc++ -Wl,-rpath=$deepmd_root/lib -Wl,-rpath=$tensorflow_root/lib -o infer_water
gcc infer_water.cpp -D HIGH_PREC -L $deepmd_root/lib -L $tensorflow_root/lib -I $deepmd_root/include -I $tensorflow_root/include -Wl,--no-as-needed -ldeepmd_cc -lstdc++ -Wl,-rpath=$deepmd_root/lib -Wl,-rpath=$tensorflow_root/lib -rpath=$deepmd_root/lib -o infer_water
```
and then run the program:
```sh
./infer_water
```
```

0 comments on commit aea3d5b

Please sign in to comment.