[gdal-dev] Ogr tutorial code in cpp not compiling due to errors

Pradeepkp pradeepkumar.penchala at iiitb.net
Fri May 6 00:03:28 EDT 2011


Hello,

While I am compiling the code (cpp version) given in
http://www.gdal.org/ogr/ogr_apitut.html

I am getting lot of compilation errors. I am not sure why they are coming as
it is the code directly taken from the above given link. Can you please look
at the screenshots attached and let me know if I am making any mistakes in
running. 


These are few sample errors:

Code:

318: enum ogr_style_tool_param_pen_id
319:{ 
320:    OGRSTPenColor       = 0,                  
321:    OGRSTPenWidth       = 1,                  
322:    OGRSTPenPattern     = 2,
323:    OGRSTPenId          = 3,
324:    OGRSTPenPerOffset   = 4,
325:    OGRSTPenCap         = 5,
326:    OGRSTPenJoin        = 6,
327:    OGRSTPenPriority    = 7,
328:    OGRSTPenLast        = 8
              
330:  };
 
 332: enum ogr_style_tool_param_brush_id
 333: { 
 334:    OGRSTBrushFColor    = 0,                  
 335:    OGRSTBrushBColor    = 1,                  
 336:    OGRSTBrushId        = 2,
 337:    OGRSTBrushAngle     = 3,                  
 338:    OGRSTBrushSize      = 4,
 339:    OGRSTBrushDx        = 5,
 340:    OGRSTBrushDy        = 6,
 342:    OGRSTBrushPriority  = 7,
http://osgeo-org.1803224.n2.nabble.com/file/n6336405/screenshots_errors.tar.gz
screenshots_errors.tar.gz 
 343:    OGRSTBrushLast      = 8
 344:             
 345: };

/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:328: error: conflicting
declaration ‘OGRSTPenLast’
/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:328: error:
‘OGRSTPenLast’ has a previous declaration as ‘ogr_style_tool_param_pen_id
OGRSTPenLast’

/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:332: error: multiple
definition of ‘enum ogr_style_tool_param_brush_id’
/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:332: error: previous
definition here

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336405.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list