text: Hi,
  Continuing along the lines of extending ROOT functionality with external libraries I have run into another issue that I am hoping someone here can help resolve. If I make a library containing a class
  foo and write a script
  bar1.C that calls the the class:
  void bar1() { foo f; }
  I can call this from root with no issues as follows:
  [0] .L libFoo.dylib [1] .x bar1.C
  If I then try to have the script
  bar2.C do the library loading using
  gSystem::Load as follows:
  void bar2() {' gSystem->Load("libFoo.dylib"); foo f; }
  I get the following error message:
  bar2.C:3:4: error: unknown type name 'foo'
  I can resolve this by adding the appropriate include to
  bar3.C
  #include "foo.h" void bar2() {' gSystem->Load("libFoo.dylib"); foo f; }
  but now receive the following error message:
  IncrementalExecutor::executeFunction: symbol '_ZN11fooC1Ev' unresolved while linking [cling interface function]! You are probably missing the definition of foo::foo() Maybe you need to load the corresponding shared library?
  Any ideas? What is the ‘proper’ way to load an external library for use like this?