Pradeep, I have seen your screenshots.
No wonder you got the multiple declaration errors, with all the 'unterminated #ifndef' and '#endif without #if" errors. You should try to identify the source of those errors. I never compiled GDAL/OGR files separately from the source tree. Check if you get the same errors if you compile the whole source tree. http://trac.osgeo.org/gdal/wiki/BuildHints You can use the compiled libraries after setting the LD_LIBRARY_PATH and GDAL_DATA environment variables to 'gdal' and 'gdal/data' directory paths. In the future you can use sites like http://pastebin.com/ to share text with others. On Fri, May 6, 2011 at 11:07 AM, PradeepKumar Penchala < pradeepkumar.pench...@iiitb.net> wrote: > Please find the attached screenshots. Now they should open. > > > On Fri, May 6, 2011 at 11:01 AM, Chaitanya kumar CH <chaitanya.ch@ > gmail.com> wrote: > >> Pradeep, >> >> I still can't open your screenshots file. (Did you resend the same file?) >> >> >> On Fri, May 6, 2011 at 10:30 AM, Pradeepkp < >> pradeepkumar.pench...@iiitb.net> wrote: >> >>> 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] <[hidden >>> email] >>> <http://user/SendEmail.jtp?type=node&node=6336487&i=0&by-user=t>>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&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&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<http://osgeo-org.1803224.n2.nabble.com/Ogr-tutorial-code-in-cpp-not-compiling-due-to-errors-tp6336405p6336472.html?by-user=t> >>>> To unsubscribe from Ogr tutorial code in cpp not compiling due to >>>> errors, click here. >>>> >>> >>> >>> >>> -- >>> Thanks and Regards, >>> Pradeep >>> GISE Lab, >>> IIT Bombay >>> 9769598197 >>> >>> >>> *screenshots_errors.tar.gz* (2M) Download >>> Attachment<http://attachment/6336487/0/screenshots_errors.tar.gz?by-user=t> >>> >>> ------------------------------ >>> View this message in context: Re: Ogr tutorial code in cpp not compiling >>> due to >>> errors<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<http://osgeo-org.1803224.n2.nabble.com/GDAL-Dev-f2022644.html>at >>> Nabble.com. >>> >>> _______________________________________________ >>> gdal-dev mailing list >>> gdal-dev@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 >> > > > > -- > Thanks and Regards, > Pradeep > GISE Lab, > IIT Bombay > 9769598197 > > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev