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

[UDUNITS #XVH-287192]: udunits backward compatibility

Hi Jim,

> I read that udunits2 supports old udunits functionality so I tried
> recompiling an application using the udunits-2.1.8 library and am
> getting the following error:
> -D_FILE_OFFSET_BITS=64  -g -c -I/home/cowie/include -I/home/cowie/include 
> -I/rap/include   ConvertUnits.cc
> In file included from ConvertUnits.cc:13:
> /home/cowie/include/udunits.h:57: error: declaration of 'ut_unit* 
> utUnit::ut_unit'
> /home/cowie/include/udunits2.h:17: error: changes meaning of 'ut_unit' from 
> 'typedef union ut_unit ut_unit'
> This is on Debain Linux 2.6.26. Is there a problem with this or am I
> missing something here?

You're not missing anything.

The problem is that the g++ compiler, unlike the C standard, doesn't allow a 
member of a structure to have the same name as a typedef.  I'm trying to 
figure-out a way around this.  If you have any suggestions, let me know.

> Thanks
> -jim
> --
> Jim Cowie
> address@hidden
> 303-497-2831

Steve Emmerson

Ticket Details
Ticket ID: XVH-287192
Department: Support UDUNITS
Priority: Normal
Status: Closed