How to generate and link the dictionary using c++?

Dear all,
Am trying to read from a vector of bool in a makeClass which has a tree with vector
of bools. I want to complie it using g++ instead of ACLIC. Is there a way to compile
get the dictionary linked using g++?
I added in my .h file, the following lines:
#pragma link C++ class vectorstd::bool;
#pragma link C++ class vectorstd::string+;
#pragma link C++ class vector+;
#pragma extra_include “vector”;

It works fine when I get a .so using ACLIC but am not sure how to use
this with g++ compilation.
Could anyone please help me with this?

Many Thanks,


When not using ACLiC, you must generate, compile and link the dictionary file explicitly.
To do so, create a file myLinkDef.h containing the #pragma statement and use:rootcint -f mydict.cxx -c myheader.h myLinkDef.h and then compile and link the result (mydict.cxx).

Note that the dictionaries for vector, vector and vector is already built in the ROOT distribution and in compile code you can load them by issuing:gROOT->ProcessLine("#include <vector>");