# Warning in \<MyClass\>: The data members of MyClass will not be stored, because it inherits from TObject but does not have its own ClassDef

**URL:** <https://root-forum.cern.ch/t/warning-in-myclass-the-data-members-of-myclass-will-not-be-stored-because-it-inherits-from-tobject-but-does-not-have-its-own-classdef/43597>\
**Category:** ROOT\
**Tags:** cling\
**Created:** [February 18, 2021, 1:25pm UTC](https://root-forum.cern.ch/t/warning-in-myclass-the-data-members-of-myclass-will-not-be-stored-because-it-inherits-from-tobject-but-does-not-have-its-own-classdef/43597 "2021-02-18T13:25:43Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [February 18, 2021, 11:10pm UTC](https://root-forum.cern.ch/t/warning-in-myclass-the-data-members-of-myclass-will-not-be-stored-because-it-inherits-from-tobject-but-does-not-have-its-own-classdef/43597/9 "2021-02-18T23:10:16Z")

</div>

Thanks for the tip, that inline solution works really great for me. No warnings when compiling, no warnings when running. And I do no need any more the extra hacks that I had added in my CMakeLists to suppress warnings, see [Silence GCC warnings in CMake C++ standalone project with ROOT classes and dictionaries](https://root-forum.cern.ch/t/silence-gcc-warnings-in-cmake-c-standalone-project-with-root-classes-and-dictionaries/43500) .

The only downside is that I have to add in my main.cpp file all the paths that are in my CMakeLists, hard-coding them by hand, as the files I want to #include depend on them:  
(which I did not need to do before when I generated the explicit dictionaries as CMake was taking care of all of it)

```auto
    gInterpreter->AddIncludePath("myprogram/submodule1/");
    gInterpreter->AddIncludePath("myprogram/core/");
    gInterpreter->AddIncludePath("/opt/boost/...");
    gInterpreter->AddIncludePath("/opt/mydriver/api");
    gInterpreter->Declare("#include \"MainWindow.hpp\"");//MainWindow.hpp includes headers that are located in the places above
    MainWindow window(...);

```

Or is there a more automated way of passing to TInterpreter the same include-paths as used in the CMakeLists.txt ?

Thanks for the awesome support.

---

_[View the full topic](https://root-forum.cern.ch/t/warning-in-myclass-the-data-members-of-myclass-will-not-be-stored-because-it-inherits-from-tobject-but-does-not-have-its-own-classdef/43597)._
