# Error in \<TTree::Branch\> with a vector of vectors

**URL:** <https://root-forum.cern.ch/t/error-in-ttree-branch-with-a-vector-of-vectors/14883>\
**Category:** ROOT\
**Created:** [September 7, 2012, 2:03am UTC](https://root-forum.cern.ch/t/error-in-ttree-branch-with-a-vector-of-vectors/14883 "2012-09-07T02:03:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [September 7, 2012, 8:40am UTC](https://root-forum.cern.ch/t/error-in-ttree-branch-with-a-vector-of-vectors/14883/3 "2012-09-07T08:40:23Z")

</div>

A brutal fix …  
… assuming that the class’es source code file is “MyClass.cxx”, execute: `echo 'gROOT->LoadMacro("MyClass.cxx++"); gSystem->Exit(0);' | root -b -l -n` … or … `root -b -l -n <<EOF
.L MyClass.cxx++
.q
EOF` This will (hopefully) create a “MyClass\_cxx.so” shared library file (it should include the class’es dictionary and all “#pragma link C++” related ones as well). Add this “MyClass\_cxx.so” shared library file (you can also rename it into something like a “[libMyClass.so](http://libMyClass.so)”, if you like) to the link command line instead of the “MyClass.o” file (no need to compile the “MyClass.cxx” file itself separately at all).

See also [url][Compile a macro without running?](https://root-forum.cern.ch/t/compile-a-macro-without-running/14759/1) and [url][Peoblems with passing bash script arguments](https://root-forum.cern.ch/t/peoblems-with-passing-bash-script-arguments/14666/1)

---

_[View the full topic](https://root-forum.cern.ch/t/error-in-ttree-branch-with-a-vector-of-vectors/14883)._
