Opened 13 years ago

Closed 12 years ago

#3477 closed defect (fixed)

Ambiguous reference to SpatialReference in 2 sample C# apps

Reported by: jdomingo Owned by: tamas
Priority: normal Milestone: 1.7.2
Component: CSharpBindings Version: 1.6.2
Severity: normal Keywords:


When compiling the sample apps for the C# bindings, an ambiguous reference error is reported for two of the apps:

mcs /r:ogr_csharp.dll /r:osr_csharp.dll /out:ogrinfo.exe apps/ogrinfo.cs
apps/ogrinfo.cs(125,17): error CS0104: `SpatialReference' is an ambiguous reference
between `OSGeo.OGR.SpatialReference' and `OSGeo.OSR.SpatialReference'

mcs /r:ogr_csharp.dll /r:osr_csharp.dll /out:createdata.exe apps/createdata.cs
apps/createdata.cs(187,17): error CS0104: `SpatialReference' is an ambiguous reference
between `OSGeo.OGR.SpatialReference' and `OSGeo.OSR.SpatialReference'

The two lines indicated in the error messages are the same:

SpatialReference sr = layer.GetSpatialRef();

The errors go away if the lines are changed to:

OSGeo.OSR.SpatialReference sr = layer.GetSpatialRef();

Change History (1)

comment:1 by tamas, 12 years ago

Milestone: 1.7.2
Resolution: fixed
Status: newclosed

Fixed in r19469 and r19470

Note: See TracTickets for help on using tickets.