# Garfield++: can't find error while loading shared libraries

**URL:** <https://root-forum.cern.ch/t/garfield-cant-find-error-while-loading-shared-libraries/18642>\
**Category:** Garfield++\
**Created:** [December 29, 2014, 7:01pm UTC](https://root-forum.cern.ch/t/garfield-cant-find-error-while-loading-shared-libraries/18642 "2014-12-29T19:01:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebqian](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/b77776/32.png) [@sebqian](https://root-forum.cern.ch/u/sebqian)\
**Post date:** [December 29, 2014, 7:01pm UTC](https://root-forum.cern.ch/t/garfield-cant-find-error-while-loading-shared-libraries/18642/1 "2014-12-29T19:01:51Z")

</div>

I am a beginner for garfield++ and just tried to install garfield++ on my SLC6 pc. I followed the installation guide. If I use make, then I always got the error when I install Garfroot: undefined reference to `Garfield::ViewGeometry::Class()’. I searched the forum and find a couple of threads talking about this problem, but none of them solved the problem in my machine. I also found that my code crashed whenever I tried to use ViewGeometry or ViewSignal.  
I then tried to use cmake to generate the libraries, now I don’t have compile or link errors when I compile GarfRoot or my other codes, but the executable program can’t run any more and I always get the error: error while loading shared libraries: libGarfield.so.0.2.0: cannot open shared object file: No such file or directory.  
The libGarfield.so.0.2.0 is acutally in $(GARFIELD\_HOME)/Library, but the program can’t find it.  
Can anyone tell me how to solve the problem? Thank you very much!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [December 29, 2014, 7:40pm UTC](https://root-forum.cern.ch/t/garfield-cant-find-error-while-loading-shared-libraries/18642/2 "2014-12-29T19:40:49Z")

</div>

Make sure that the “$(GARFIELD\_HOME)/Library” directory is present in your “LD\_LIBRARY\_PATH” environment variable.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [June 21, 2018, 9:12am UTC](https://root-forum.cern.ch/t/garfield-cant-find-error-while-loading-shared-libraries/18642/3 "2018-06-21T09:12:27Z")

</div>

Closed on June 21, 2018, 9:12am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
