Ticket #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: | |
| Cc: |
Description
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
Note: See
TracTickets for help on using
tickets.
