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.
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: > > > g++ -DLINUX -DLINUX -D_BSD_TYPES -DF_UNDERSCORE2 -D_LARGEFILE_SOURCE > -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 > NCAR/RAL > address@hidden > 303-497-2831 Regards, Steve Emmerson Ticket Details =================== Ticket ID: XVH-287192 Department: Support UDUNITS Priority: Normal Status: Closed