CMake - Rootcint does not find library

Hello all,

I’m trying to create a dictionary using the ROOT_GENERATE_DICTIONARY in CMake following the offical example:

Unfortunately I get the error:

.../root-install/bin/rootcint: error while loading shared libraries: cannot open shared object file: No such file or directory

It works if I do

source .../root-install/bin/

or if I set LD_LIBRARY_PATH to the lib manually beforehand.

The question is now:
Do I miss something here or is it always required to set up all root-env. variables beforehand? As far as I understand it’s better to avoid setting env. vars as much as possible?
If there’s no way around: Is there a good way to set them up inside of CMake?

Yes, it is the way it works… You have to set the environment variables first.

Thanks for the fast answer.

1 Like

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