Cint error in Geant4


I’m getting following error while compiling g4 code:

Linking CXX executable Tiletester
/usr/bin/ld: cannot find -lCint

Please help. Thanks in advance!


Which ROOT version is that? Who wrote the Makefile that is echoing “Linking CXX executable Tiletester”?

Cheers, Axel.

Hi Axel,
It is ROOT 6.06/04.

I have CMakeLists.txt file modified from one of basic Geant4 examples.

Can you provide the CMakeLists.txt file? It certainly needs to be adapted to ROOT6 since libCint does not exists anymore.

Here it is
CMakeLists.txt (3.19 KB)

The general instructions on how to use ROOT from a CMake project are in … ject-cmake
I have modified (not tested) the attached file to conform to the instructions. If ROOT is build with CMake it should be fine.
CMakeLists-modified.txt (2.35 KB)

Thanks mato,

The file you modified gives me another error when running cmake:
CMake Error at CMakeLists.txt:26 (include):
include called with wrong number of arguments. Include only takes one
– Configuring incomplete, errors occurred!

Line 26 in CMakeLists.txt is:

I’m using root 6.06/04 compiled with cmake.


I fixed problem, doing “include(${Geant4_USE_FILE})” before “include(${ROOT_USE_FILE})” triggers the issue which I posted in previous message. including g4 after including root works fine.

Why ordering does matter?