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

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 .

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)

    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.