[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Support #ATY-776694]: [udunits] Compiler-Error in udunits2 with compatibility include-file of udunits
- Subject: [Support #ATY-776694]: [udunits] Compiler-Error in udunits2 with compatibility include-file of udunits
- Date: Tue, 28 Jul 2009 10:47:49 -0600
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