I’ve gotten a lot of help here and I’m close to having a working dictionary generated for my project. However, the EspressoDict_classdef.cpp file generated for my project does not compile. My dictionary includes I/O customizations, and the problem seems to be related to these. My XML file looks like
<lcgdict>
...
<class name="espresso_block">
<field name = "data" transient = "true"/>
</class>
<class name="espresso_vector" />
<class name="espresso_matrix" />
<ioread version="[1-100]"
sourceClass="espresso_vector"
source="size_t size; double* data;"
targetClass="espresso_vector"
target="block"
include="TVirtualObject.h"
>
<![CDATA[{
block = new espresso_block();
block->size = onfile.size;
block->data = onfile.data;
}]]>
</ioread>
<ioread version="[1-100]"
sourceClass="espresso_matrix"
source="size_t size; double* data;"
targetClass="espresso_matrix"
target="block"
include="TVirtualObject.h"
>
<![CDATA[{
block = new espresso_block();
block->size = onfile.size;
block->data = onfile.data;
}]]>
</ioread>
</lcgdict>
I added the include="TVirtualObject.h"
lines in a blind attempt to solve the problem, but they had no effect. genre flex
runs with no errors or warnings; however, the resulting project (including EspressoDict_classdef.cpp) does not compile. Instead, a number of errors are produced, the primary ones being
T/Espresso/EspressoDict_classdef.cpp:99:54: error: ‘TVirtualObject’ has not been declared
static void read_espresso_vector_0( char* target, TVirtualObject *oldObj )
^
FT/Espresso/EspressoDict_classdef.cpp: In function ‘void ROOT::read_espresso_vector_0(char*, int*)’:
...
FT/Espresso/EspressoDict_classdef.cpp:118:14: error: ‘TClassRef’ does not name a type
static TClassRef cls("espresso_vector");
^
...
Manually adding the line and continuing the compilation seems to work…