This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Heiko,
> I have now made some small tests. The problem is, that you use the name
> ut_unit twice, once as typedef and once as variablename:
>
> typedef struct utUnit {
> ut_unit* ut_unit;
> } utUnit;
That's allowed in C. I guess the g++ compiler is more restrictive.
> If you change the second ut_unit with something else (e.g. ut_Unit),
> this works nicely as interface. But you will also need to change your
> files udunits-1.c:
>
> perl -pi.bak -e 's/->ut_unit/->ut_Unit/g;' udunits-1.c
>
>
> And of course, I don't know if anybody outside did rely upon
> utUnit->ut_unit , but I doubt it since the utUnit struct has been
> changed since udunits-1 anyway.
I changed the member's name from "ut_unit" to "unit2". This will be in the
next release.
> Best regards,
>
> Heiko
Regards,
Steve Emmerson
Ticket Details
===================
Ticket ID: ATY-776694
Department: Support UDUNITS
Priority: High
Status: Closed