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

Pradeepkp pradeepkumar.penchala at iiitb.net
Fri May 6 01:00:09 EDT 2011


Hello Chaitanya,

ogr_core.h is present in the same directory where .cpp is present. Gdal
files, you mean the header files which are required right, I have included
all of them and are present in the same directory.


Thanks and Regards,
Pradeepkp

On Fri, May 6, 2011 at 10:22 AM, Chaitanya kumar CH [via OSGeo.org] <
ml-node+6336472-597452847-327800 at n2.nabble.com> wrote:

> 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 <[hidden email]<http://user/SendEmail.jtp?type=node&node=6336472&i=0&by-user=t>
> > 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<http://osgeo-org.1803224.n2.nabble.com/file/n6336405/screenshots_errors.tar.gz?by-user=t>
>> 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<http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336405.html?by-user=t>
>> Sent from the GDAL - Dev mailing list archive at Nabble.com.
>> _______________________________________________
>> gdal-dev mailing list
>> [hidden email]<http://user/SendEmail.jtp?type=node&node=6336472&i=1&by-user=t>
>>
>> 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
>
> _______________________________________________
> gdal-dev mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=6336472&i=2&by-user=t>
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336472.html
>  To unsubscribe from Ogr tutorial code in cpp not compiling due to errors, click
> here<http://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6336405&code=cHJhZGVlcGt1bWFyLnBlbmNoYWxhQGlpaXRiLm5ldHw2MzM2NDA1fC00MTA3MDExNTk=>.
>
>



-- 
Thanks and Regards,
Pradeep
GISE Lab,
IIT Bombay
9769598197


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336487.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110505/59517055/attachment.html


More information about the gdal-dev mailing list