Hello Chaitanya,<br><br>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. <br>
<br><br>Thanks and Regards,<br>Pradeepkp<br><br><div class="gmail_quote">On Fri, May 6, 2011 at 10:22 AM, Chaitanya kumar CH [via OSGeo.org] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=6336487&i=0&by-user=t" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">

        Pradeep,<br><br>I see your ogr_core.h file is in a separate directory. Are you compiling ogr without the gdal files?<br><br>Also, I couldn&#39;t open the screenshots archive.<br><br></div><div class="gmail_quote"><div><div>
</div><div class="h5">On Fri, May 6, 2011 at 9:33 AM, Pradeepkp <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=6336472&amp;i=0&amp;by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;"><div><div></div><div class="h5">Hello,<br>
<br>
While I am compiling the code (cpp version) given in<br>
<a href="http://www.gdal.org/ogr/ogr_apitut.html" rel="nofollow" link="external" target="_blank">http://www.gdal.org/ogr/ogr_apitut.html</a><br>
<br>
I am getting lot of compilation errors. I am not sure why they are coming as<br>
it is the code directly taken from the above given link. Can you please look<br>
at the screenshots attached and let me know if I am making any mistakes in<br>
running.<br>
<br>
<br>
These are few sample errors:<br>
<br>
Code:<br>
<br>
318: enum ogr_style_tool_param_pen_id<br>
319:{<br>
320:    OGRSTPenColor       = 0,<br>
321:    OGRSTPenWidth       = 1,<br>
322:    OGRSTPenPattern     = 2,<br>
323:    OGRSTPenId          = 3,<br>
324:    OGRSTPenPerOffset   = 4,<br>
325:    OGRSTPenCap         = 5,<br>
326:    OGRSTPenJoin        = 6,<br>
327:    OGRSTPenPriority    = 7,<br>
328:    OGRSTPenLast        = 8<br>
<br>
330:  };<br>
<br>
 332: enum ogr_style_tool_param_brush_id<br>
 333: {<br>
 334:    OGRSTBrushFColor    = 0,<br>
 335:    OGRSTBrushBColor    = 1,<br>
 336:    OGRSTBrushId        = 2,<br>
 337:    OGRSTBrushAngle     = 3,<br>
 338:    OGRSTBrushSize      = 4,<br>
 339:    OGRSTBrushDx        = 5,<br>
 340:    OGRSTBrushDy        = 6,<br>
 342:    OGRSTBrushPriority  = 7,<br>
<a href="http://osgeo-org.1803224.n2.nabble.com/file/n6336405/screenshots_errors.tar.gz?by-user=t&by-user=t" rel="nofollow" link="external" target="_blank">http://osgeo-org.1803224.n2.nabble.com/file/n6336405/screenshots_errors.tar.gz</a><br>

screenshots_errors.tar.gz<br>
 343:    OGRSTBrushLast      = 8<br>
 344:<br>
 345: };<br>
<br>
/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:328: error: conflicting<br>
declaration ‘OGRSTPenLast’<br>
/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:328: error:<br>
‘OGRSTPenLast’ has a previous declaration as ‘ogr_style_tool_param_pen_id<br>
OGRSTPenLast’<br>
<br>
/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:332: error: multiple<br>
definition of ‘enum ogr_style_tool_param_brush_id’<br>
/home/pradeep/android maps/Ogr Tutorial/ogr_core.h:332: error: previous<br>
definition here<br>
</div></div><font color="#888888"><div><div></div><div class="h5"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336405.html?by-user=t&by-user=t" rel="nofollow" link="external" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336405.html</a><br>


Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
</div></div><a href="http://user/SendEmail.jtp?type=node&amp;node=6336472&amp;i=1&amp;by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a><div class="im"><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></font></blockquote></div><br><br clear="all"><div class="im"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>
<br></div>_______________________________________________
<br>gdal-dev mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=6336472&amp;i=2&amp;by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im"><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
        
        <br>
        <br>
        </div><hr color="#cccccc" noshade size="1">
        <div style="color: rgb(68, 68, 68); font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <div style="font-weight: bold;">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336472.html?by-user=t" target="_blank" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336472.html</a>
        </div>
        <div style="color: rgb(102, 102, 102); font: 11px tahoma,geneva,helvetica,arial,sans-serif; margin-top: 0.4em;">
                
                To unsubscribe from Ogr tutorial code in cpp not compiling due to errors, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.
        </div></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><div>Thanks and Regards,<br>Pradeep <br></div><div>GISE Lab,</div><div>IIT Bombay</div>
<div>9769598197</div></span><br>
<div class="small"><br/><img src="/images/icon_attachment.gif?by-user=t" > <strong>screenshots_errors.tar.gz</strong> (2M) <a href="/attachment/6336487/0/screenshots_errors.tar.gz?by-user=t" target="_top" rel="nofollow" link="external">Download Attachment</a></div>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336487.html">Re: Ogr tutorial code in cpp not compiling due to errors</a><br/>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/GDAL-Dev-f2022644.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br/>