Hi,
as a quick thing to try can you change the compilation command from:
g++ `root-config --cflags --glibs` -o gui main.cpp gui.cpp DictOutput.cxx
to
g++ -o gui main.cpp gui.cpp DictOutput.cxx `root-config --cflags --glibs`
(I’m not crazy, order matters )