Error in dictionary generation

Dear all

I am trying to build a shared object library for a C++ ROOT classs, so that I can load it into my pyROOT scripts. I follow the instructions in root documentations and create LinkDef.h file and create the .so file, It builds fine. However when I load the .so file in ROOT session (both pyroot and c++root) I am getting the following error

IncrementalExecutor::executeFunction: symbol '_ZN4PlotC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiib' unresolved while linking symbol '__cf_12'!
You are probably missing the definition of Plot::Plot(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, bool)
Maybe you need to load the corresponding shared library?
Error in <TClingCallFunc::make_wrapper>: Failed to compile

This seems to suggests that I am missing some pragma declarations in the LinkDef file. Can some one please tell me what else am I missing in the LinkDef file ?

I generate the .so file as given in the following . All the relevant files are attached.

rootcling -f DictOutput.cxx Plot.h LinkDef.h
g++ -std=c++11 -fPIC -shared -o `root-config --glibs --cflags` DictOutput.cxx

LinkDef.h (52 Bytes) Plot.C (6.1 KB) Plot.h (1.8 KB)


`root-config --cxx --cflags` -fPIC -shared -o Plot.C DictOutput.cxx `root-config --libs`

Thanks a lot. That has worked for me

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.