Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[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



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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690