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

Chaitanya kumar CH chaitanya.ch at gmail.com
Fri May 6 00:52:08 EDT 2011


Pradeep,

I see your ogr_core.h file is in a separate directory. Are you compiling ogr
without the gdal files?

Also, I couldn't open the screenshots archive.

On Fri, May 6, 2011 at 9:33 AM, Pradeepkp
<pradeepkumar.penchala at iiitb.net>wrote:

> 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.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110506/ac9f9203/attachment-0001.html


More information about the gdal-dev mailing list