[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strings and hddm-c
Richard,
I don't know if I ever described this problem in detail to you but here
goes...
If an hddm template calls for a string type in, hddm-c generates a line
like:
pp->label = (string*)&hddm_nullTarget;
in the .c file. Both the C and C++ compilers choke on this. For example,
with gcc:
hddm_simple.c: In function ‘make_simple_Bottomlevels’:
hddm_simple.c:75: error: ‘string’ undeclared (first use in this function)
hddm_simple.c:75: error: (Each undeclared identifier is reported only once
hddm_simple.c:75: error: for each function it appears in.)
hddm_simple.c:75: error: expected expression before ‘)’ token
For the C API, shouldn't we just go back to calling XML strings char*'s?
-- Mark
P. S. I've attached an illustrative hddm template.
<?xml version="1.0"?>
<HDDM class="simple" version="1.0" xmlns="http://www.gluex.org/hddm">
<toplevel value="float" index="int" maxOccurs="unbounded">
<midlevel value="float" index="int" minOccurs="0" maxOccurs="unbounded">
<bottomlevel value="float" index="int" label="string" minOccurs="0" maxOccurs="unbounded" />
</midlevel>
<midlevel2 value="float" index="int" minOccurs="0" maxOccurs="unbounded" />
</toplevel>
</HDDM>