# Error when executing a program with ROOT as a C++ library: Error in \<TClass::LoadClassInfo\>: no interpreter information

**URL:** <https://root-forum.cern.ch/t/error-when-executing-a-program-with-root-as-a-c-library-error-in-tclass-loadclassinfo-no-interpreter-information/58008>\
**Category:** ROOT\
**Tags:** bug\
**Created:** [January 31, 2024, 1:30am UTC](https://root-forum.cern.ch/t/error-when-executing-a-program-with-root-as-a-c-library-error-in-tclass-loadclassinfo-no-interpreter-information/58008 "2024-01-31T01:30:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Genki\_Nukazuka](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/genki_nukazuka/32/23412_2.png) [@Genki\_Nukazuka](https://root-forum.cern.ch/u/Genki_Nukazuka)\
**Post date:** [January 31, 2024, 1:30am UTC](https://root-forum.cern.ch/t/error-when-executing-a-program-with-root-as-a-c-library-error-in-tclass-loadclassinfo-no-interpreter-information/58008/1 "2024-01-31T01:30:00Z")

</div>

### Describe the problem

I compiled a very simple C++ code with ROOT as a C++ library and obtained an error when executing it:  
`Error in <TClass::LoadClassInfo>: no interpreter information for class TH1D is available even though it has a TClass initialization routine.`

### To Reproduce

#### The source code

```auto
#include <TFile.h>
#include <TH1D.h>

int main( int argc, char* argv[] )
{

  TFile* tf = new TFile( "dummy.root", "READ" );
  TH1D* hist = new TH1D( "hist", "title", 100, 0, 100 ) ;
  return 0;
}

```

[dummy.root](https://root-forum.cern.ch/uploads/short-url/aUV8y3BPQKHhwDg5Nuofy3qHwEL.root) (431 Bytes)  
Any ROOT file is okay to reproduce this problem as far as I can see.

#### Compiling

```auto
g++ `root-config --cflags` `root-config --libs` sample.cc

```

#### What I got when executing it

```auto
[genki 19:50:28 temp] $ ./a.out
Error in <TClass::LoadClassInfo>: no interpreter information for class TH1D is available even though it has a TClass initialization routine.

```

### Expected behavior

I think the code should show no error.  
If I change the following part

```auto
  TFile* tf = new TFile( "dummy.root", "READ" );
  TH1D* hist = new TH1D( "hist", "title", 100, 0, 100 ) ;

```

to

```auto
  TH1D* hist = new TH1D( "hist", "title", 100, 0, 100 ) ;
  TFile* tf = new TFile( "dummy.root", "READ" );

```

, the error doesn’t appear.

### Setup

```auto
ROOT v6.30/02
Built for macosx64 on Jan 29 2024, 01:08:11
From heads/master@tags/v6-30-02
With Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Binary directory: /Users/genki/soft/ROOT/6.30.02/install/bin

```

I built ROOT by myself. The compiler is

```auto
[genki 19:57:23 temp] $ g++ --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

```

#### Another setup

I could reproduce the problem with another setup

```auto
ROOT v6.26/06
Build for linuxx8664gcc
With ??? (unknown compiler since I didn't prepare it)

```

The compiler I used was

```auto
[nukazuka@sphnx03 20:12:24 ~] $ g++ --version
g++ (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [January 31, 2024, 5:59am UTC](https://root-forum.cern.ch/t/error-when-executing-a-program-with-root-as-a-c-library-error-in-tclass-loadclassinfo-no-interpreter-information/58008/2 "2024-01-31T05:59:59Z")

</div>

Dear Genki,

Thanks for reporting!  
We are looking into this.

Cheers,  
D

---

<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:** [February 14, 2024, 7:32pm UTC](https://root-forum.cern.ch/t/error-when-executing-a-program-with-root-as-a-c-library-error-in-tclass-loadclassinfo-no-interpreter-information/58008/4 "2024-02-14T19:32:16Z")

</div>

Closed on February 14, 2024, 7:32pm UTC

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