Cint Option
-w [0/1] → Switch between archive library and DLL when creating interface method source file.
Example : cint -w0 -n…/output.cxx -D_MakeCINT_ -I…/…/folder sample.h
Above command is used to load sample.h , folder directory and MakeCINT macro and pushes interface to output.cxx
Question realted Cling;
Could help me to fiind similar option for cling to switch between archive library and DLL when creating interface method source.
@Axel / @bellenot / @vvassilev
Could you please help me how to load only .hpp file and call functions without loading .cpp files.
Eaxmple program:
Demo.hpp:-
class Demo{
int sampleFun();
};
Demo.cpp:-
int Demo::sampleFun(){ return 1;}
I had got below error after loading only demo.hpp and called sampleFun() function in Cling.
ERROR:
“IncrementalExecutor::executeFunction: symbol ‘_ZN4Demo7sampleFunEV’ unresolved while linking [cling interface function]!
You are probably missing the defination of Demo::sampleFun()
Maybe you need to load the corresponding shared library?”
Could you please help me with how to load shared library in cling (calling a function by just loading .hpp file)
I was able to call functions of a class by loading shared Library (.so file) and header file.
.L project.so
.L demo.hpp
Demo d;
d.sampleFun();
With the help of above commands, i was able to call fucntions of a class by loading .so file and .hpp file
Issue got resolved.
Thanks @Axel@bellenot for quick help.