I just got this option to work, but its missing the macros, which I would have to presumably add by hand. When a user loads mylib.so, they automatically get the libjansson functionality at the CINT. #ifdef _CINT_Īnd my rootcint call looks like: rootcint -f mylib/mylib_Dict.C -c -Iinclude -I/usr/local/include mylib/M圜lass.h /usr/local/include/jansson.h mylib/mylib_LinkDef.h One problem with this is that the location of jansson.h could vary on each system… but that’s a pretty trivial problem to overcome.ī) My current attempts are to put the janson.h file into my LinkDef file and link this into mylib. h file (a LinkDef.h?) that they would call from the CINT which would make the necessary calls to gInterpreter, AddIncludePath and then. Or, at least very easily.Ī) provide them with a. I want it to be automatic for my collaborators to access the libjansson stuff, if possible. This library depends on libjansson (and libcurl).
Libjansson embed one json object in another json object software#
I have a module in our data analysis software framework which builds a separate library (let’s call it mylib.so). My ultimate goal with all of this is the following. If I edit jansson.h and put it all into a single line, it doesn’t complain. Warning: Error occurred during dictionary source generation Warning: Error occurred during reading source files Error: unexpected character in expression 0)) /usr/local/include/jansson.h:35:Įrror: unexpected character in expression 0)) /usr/local/include/jansson.h:35: #define JANSSON_VERSION_HEX ((JANSSON_MAJOR_VERSION << 16) | \
The jansson.h file has the following line: The jansson.h file includes a number of macros, how would I tell ACLiC about these? Also, how would I do this exactly with a LinkDef file? (would I need to just make a #pragma entry in the LinkDef file for every #define found in jansson.h?) Hi Philippe… this worked, but I’m still missing a few things. Json_t *obj = json_pack("","hello","world") Ĭhar * buf = json_dumps(obj, JSON_INDENT(2)) Probably your macro uses something rootcint can't parse.Įrror: Function testfunction() is not defined in current scope :-1: Info in : The compiler has not found any problem with your macro. I686-apple-darwin10-g++-4.2.1: /usr/local/include: linker input file unused because linking not done Info in : Invoking compiler to check macro's validity !!!Removing /Users/adam/testfunction_cc_ACLiC_dict.cxx /Users/adam/testfunction_cc_ACLiC_dict.h !!!Įrror: /Users/adam/softwareDev/root/v5.28.00a/bin/rootcint: error loading headers. var/tmp//rootcint_Npb6NS.h:3:30: error: /usr/local/include: No such file or directoryĮrror: external preprocessing failed. In file included from /var/tmp/tmp.0.pvz9ZE_cint.cxx:1: Warning in : Failed to generate the dependency file for /Users/adam/./testfunction_cc.so Info in : creating shared library /Users/adam/./testfunction_cc.so