<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">14.07.2012 5:18, taibc пишет:<br>
    </div>
    <blockquote
      cite="mid:1342228673.30169.YahooMailNeo@web190001.mail.sg3.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:times
        new roman, new york, times, serif;font-size:12pt">
        <div><span>Thanks Dmitry,</span></div>
        <div><br>
        </div>
        <div>Please see attached files for screenshots.</div>
        <div><br>
          <span></span></div>
        <div><span>Here is the code of the main.cpp (the project only
            includes this file):</span></div>
        <div><br>
          <span></span></div>
        <div><span><span style="font-style: italic;">#include
              <iostream></span><br style="font-style: italic;">
            <span style="font-style: italic;">#include "ogrsf_frmts.h"</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">using namespace std;</span><br
              style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">int main()</span><br
              style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">{</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        OGRRegisterAll();</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">       
              OGRDataSource       *poDS;</span><br style="font-style:
              italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">        poDS =
              OGRSFDriverRegistrar::Open( "point.shp", FALSE );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        if( poDS == NULL )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        {</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            printf( "Open
              failed.\n" );</span><br style="font-style: italic;">
            <span style="font-style: italic;">            exit( 1 );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        }</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        OGRLayer 
              *poLayer;</span><br style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">        poLayer =
              poDS->GetLayerByName( "point" );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        OGRFeature
              *poFeature;</span><br style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">       
              poLayer->ResetReading();</span><br style="font-style:
              italic;">
            <span style="font-style: italic;">        while( (poFeature
              = poLayer->GetNextFeature()) != NULL )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        {</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            OGRFeatureDefn
              *poFDefn = poLayer->GetLayerDefn();</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            int iField;</span><br
              style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">            for( iField =
              0; iField < poFDefn->GetFieldCount(); iField++ )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            {</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">               
              OGRFieldDefn *poFieldDefn = poFDefn->GetFieldDefn(
              iField );</span><br style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">                if(
              poFieldDefn->GetType() == OFTInteger )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                   
              printf( "%d,", poFeature->GetFieldAsInteger( iField )
              );</span><br style="font-style: italic;">
            <span style="font-style: italic;">                else if(
              poFieldDefn->GetType() == OFTReal )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                   
              printf( "%.3f,", poFeature->GetFieldAsDouble(iField) );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                else if(
              poFieldDefn->GetType() == OFTString )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                   
              printf( "%s,", poFeature->GetFieldAsString(iField) );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                else</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                   
              printf( "%s,", poFeature->GetFieldAsString(iField) );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            }</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            OGRGeometry
              *poGeometry;</span><br style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">            poGeometry =
              poFeature->GetGeometryRef();</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            if( poGeometry
              != NULL </span><br style="font-style: italic;">
            <span style="font-style: italic;">                &&
              wkbFlatten(poGeometry->getGeometryType()) == wkbPoint )</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            {</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                OGRPoint
              *poPoint = (OGRPoint *) poGeometry;</span><br
              style="font-style: italic;">
            <br style="font-style: italic;">
            <span style="font-style: italic;">                printf(
              "%.3f,%3.f\n", poPoint->getX(), poPoint->getY() );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            }</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            else</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">            {</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">                printf(
              "no point geometry\n" );</span><br style="font-style:
              italic;">
            <span style="font-style: italic;">            }      </span><br
              style="font-style: italic;">
            <span style="font-style: italic;">           
              OGRFeature::DestroyFeature( poFeature );            </span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        }</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">       
              OGRDataSource::DestroyDataSource( poDS );</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">        return 0;</span><br
              style="font-style: italic;">
            <span style="font-style: italic;">}</span></span></div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Thanks and regards,</div>
        <div><br>
          Tai<br>
        </div>
        <div style="font-family: times new roman, new york, times,
          serif; font-size: 12pt;">
          <div style="font-family: times new roman, new york, times,
            serif; font-size: 12pt;">
            <div dir="ltr"> <font face="Arial" size="2">
                <hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
                Dmitry Baryshnikov [via OSGeo.org] <<a
                  moz-do-not-send="true"
                  href="/user/SendEmail.jtp?type=node&node=4988339&i=0"
                  target="_top" rel="nofollow" link="external">[hidden
                  email]</a>><br>
                <b><span style="font-weight: bold;">To:</span></b> taibc
                <<a moz-do-not-send="true"
                  href="/user/SendEmail.jtp?type=node&node=4988339&i=1"
                  target="_top" rel="nofollow" link="external">[hidden
                  email]</a>> <br>
                <b><span style="font-weight: bold;">Sent:</span></b>
                Friday, July 13, 2012 5:43 PM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                Re: Error LNK1120: 314 unresolved externals - When using
                Ogr C++ class on Visual Studio 2010<br>
              </font> </div>
            <br>
            <div id="yiv1657879342"><br>
              Hi Tai,<br>
              <br>
              Please post your code and screenshots of project tree and
              properties Linker ->Input and C/C++ -> Preprocessor
              definitions<br>
              <br>
              Best regards,<br>
                     Dmitry<br>
              <br>
              <br>
              _______________________________________________
              <br>
              gdal-dev mailing list
              <br>
              <a moz-do-not-send="true" href="" rel="nofollow"
                target="_top" link="external">[hidden email]</a>
              <br>
              <a moz-do-not-send="true" rel="nofollow" target="_blank"
                href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
                link="external">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
              <br>
              <br>
              <hr color="#cccccc" noshade="noshade" size="1">
              <div style="color:#444;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 class="moz-txt-link-freetext" href="http://osgeo-org.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103p4988193.html">http://osgeo-org.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103p4988193.html</a>

              </div>
              <div style="color:#666;font:11px tahoma, geneva,
                helvetica, arial,
                sans-serif;margin-top:.4em;line-height:1.5em;"> To
                unsubscribe from Error LNK1120: 314 unresolved externals
                - When using Ogr C++ class on Visual Studio 2010, <a
                  moz-do-not-send="true" rel="nofollow" target="_blank"
                  href="" link="external">click here</a>.<br>
                <a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
                  style="font:9px serif;" link="external">NAML</a> </div>
            </div>
            <br>
            <br>
          </div>
        </div>
      </div>
      <div class="small"><br>
        <img moz-do-not-send="true" src="/images/icon_attachment.gif"> <strong>Preprocessor.png</strong>
        (316K) <a moz-do-not-send="true"
href="http://osgeo-org.1560.n6.nabble.com/attachment/4988339/0/Preprocessor.png"
          target="_top" rel="nofollow" link="external">Download
          Attachment</a><br>
        <img moz-do-not-send="true" src="/images/icon_attachment.gif"> <strong>Linker_Input.png</strong>
        (318K) <a moz-do-not-send="true"
href="http://osgeo-org.1560.n6.nabble.com/attachment/4988339/1/Linker_Input.png"
          target="_top" rel="nofollow" link="external">Download
          Attachment</a><br>
        <img moz-do-not-send="true" src="/images/icon_attachment.gif"> <strong>Project
          tree.png</strong> (271K) <a moz-do-not-send="true"
href="http://osgeo-org.1560.n6.nabble.com/attachment/4988339/2/Project%20tree.png"
          target="_top" rel="nofollow" link="external">Download
          Attachment</a></div>
      <br>
      <hr align="left" width="300">
      View this message in context: <a moz-do-not-send="true"
href="http://osgeo-org.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103p4988339.html">Re:
        Error LNK1120: 314 unresolved externals - When using Ogr C++
        class on Visual Studio 2010</a><br>
      Sent from the <a moz-do-not-send="true"
        href="http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html">GDAL
        - Dev mailing list archive</a> at Nabble.com.<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
    </blockquote>
    Try to add to preprocessor definitions:<br>
    <br>
    _WINDOWS<br>
    STRICT<br>
    _CRT_SECURE_NO_DEPRECATE<br>
    _CRT_NONSTDC_NO_DEPRECATE<br>
    _USRDLL<br>
    <br>
    Best regards,<br>
        Dmitry<br>
  </body>
</html>