# C++ example runs failed

**URL:** <https://discuss.ray.io/t/c-example-runs-failed/12697>\
**Category:** Ray Core\
**Created:** [November 3, 2023, 7:09am UTC](https://discuss.ray.io/t/c-example-runs-failed/12697 "2023-11-03T07:09:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![littleliang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/littleliang/32/5275_2.png) [@littleliang](https://discuss.ray.io/u/littleliang)\
**Post date:** [November 3, 2023, 7:09am UTC](https://discuss.ray.io/t/c-example-runs-failed/12697/1 "2023-11-03T07:09:07Z")

</div>

I build two nodes cluster by ray, and compile the cpp example successful, but it runs failed sometimes.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/1/1a1bc5ab2d89155930759bb408751bd6975b76f1.jpeg)

And the log shows that example.so not loaded  
_ **function\_helper.cc:152: /root/.cache/bazel/\_bazel\_root/7610a462699889935b9daf1ea884ae4d/execroot/main/bazel-out/k8-fastbuild/bin dynamic library not found.** _

what should i do?

---

<div class="post-metadata">

**Author:** ![GuyangSong](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/guyangsong/32/181_2.png) [@GuyangSong](https://discuss.ray.io/u/GuyangSong)\
**Post date:** [November 8, 2023, 1:53am UTC](https://discuss.ray.io/t/c-example-runs-failed/12697/2 "2023-11-08T01:53:12Z")

</div>

Seems like the ray worker can’t find the example.so. You should also compile it and add it into `code_search_path`. You can set the `code_search_path` by adding `--ray_code_search_path={your_path}` to the driver command. And you must ensure the example.so has been distributed to all of your ray nodes.
