right … I would too … but I got myself confused 
I can certainly understand that, it’s taken a lot for me to wrap my head around!
I’m not quite following the “free standing” version - you mean, outside of a class? or with a concrete type…? of…?
OK, my previously alluded to progress was a much more straight forward (and crude) method - if we really need a dictionary with specific #pragma
lines for every type, then let’s build one on the fly. So i’ve implemented code that, on call to Set<Type>
, will check the linkdef for a suitable #pragma ... Set<Type>
line, and if not present, will add one and invoke system("make libMyClass_RootDict.so");
to recompile it! 
We can then instantiate a new TInterpreter
, load the dictionary, pass it our objects and call our Set function. It’s pretty roundabout, but it works… mostly.
At this point the problem has changed, so perhaps its worth moving to a new thread, but in short the problem is trying to build the dictionary with:
#pragma link C++ function MyClass::Set(std::string, TVector3);
returns
rootcint -f MyClass_RootDict.cxx -c -p -I./include -fPIC `root-config --cflags` include/MyClass.h MyClass_Linkdef.hh
Error: class,struct,union or type TVector3 not defined MyClass_Linkdef.hh:29:
Error: Ambiguous overload resolution (2,2) MyClass_Linkdef.hh:29:
Calling : MyClass::Set(string,void*&);
Match rank: file line signature
* 2 include/MyClass.h 164 bool MyClass::Set(string,void*,bool);
* 2 include/MyClass.h 138 bool MyClass::Set(string,void*);
if i #include "TVector3.h"
at the top of my Linkdef file (uughhh… and how do i do that automatically?) i get a slew of errors about TVector3 not being defined in the Dict.cxx
MyClass_RootDict.cxx: In function 'int G__MyClass_RootDict_435_0_37(G__value*, const char*, G__param*, int)':
MyClass_RootDict.cxx:717:115: error: 'TVector3' was not declared in this scope
G__letint(result7, 103, (long) ((MyClass*) G__getstructoffset())->Set(*((string*) G__int(libp->para[0])), *((TVector3*) G__int(libp->para[1]))));