[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strings and hddm-c



Mark,

I tried to reproduce the problem you claim, and cannot.  You must be out
of date, from a long time ago.  Can you update from the subversion hddm
package and rerun?  I looked through all of my code and examples, and
everywhere strings are denoted by the type "string_t" but you have
simply "string" in your examples below.  If this is a typo, please send
along a corrected example so that I can reproduce the problem.  Of
course, for me everything works, which I agree is not a very general
statement.

-Richard J.


Mark M. Ito wrote:
> 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.
>
>