[gdal-dev] Error LNK1120: 314 unresolved externals - When using Ogr C++ class on Visual Studio 2010

Dmitry Baryshnikov polimax at mail.ru
Fri Jul 13 00:04:08 PDT 2012


13.07.2012 10:56, taibc ?????:
> Thanks Dmitry,
>
> I linked the file gdal_i.lib to the project (by editing 'Additional 
> Dependencies' in the area: Linker/Input). And still got similar errors 
> (but the number of errors were reduced) ?
>
> Kind regards,
> Tai
>
> ------------------------------------------------------------------------
> *From:* Dmitry Baryshnikov [via OSGeo.org] <[hidden email] 
> </user/SendEmail.jtp?type=node&node=4988131&i=0>>
> *To:* taibc <[hidden email] 
> </user/SendEmail.jtp?type=node&node=4988131&i=1>>
> *Sent:* Friday, July 13, 2012 1:17 PM
> *Subject:* Re: Error LNK1120: 314 unresolved externals - When using 
> Ogr C++ class on Visual Studio 2010
>
> 13.07.2012 7:56, taibc ?????:
>
> > Hi everyone,
> >
> > I am trying to use Ogr C++ class on Visual Studio 2010. I created an 
> new
> > empty Visual C++ project (Win 32 Console Application). Then added 
> Ogr files
> > into project, then buid it.
> >
> > I got the errors similar as below:
> >
> > /Error 147 error LNK2001: unresolved external symbol "private: 
> virtual int
> > __thiscall OGRLinearRing::_exportToWkb(enum 
> OGRwkbByteOrder,int,unsigned
> > char *)const " 
> (?_exportToWkb at OGRLinearRing@@EBEHW4OGRwkbByteOrder@@HPAE at Z)
> > c:\Users\administrator\documents\visual studio
> > 2010\Projects\CLCConverter\CLCConverter\main.obj CLCConverter/
> >
> > Do you know how to fix it ?
> >
> > Thanks and regards,
> >
> > Tai
> >
> > --
> > View this message in context: 
> http://osgeo-org.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103.html
> > Sent from the GDAL - Dev mailing list archive at Nabble.com 
> <http://nabble.com/>.
> > _______________________________________________
> > gdal-dev mailing list
> > [hidden email]
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> >
> Hi,
>
> You have to link gdal1x.lib to your project
>
> Best regards,
> Dmitry
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> 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.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103p4988120.html 
>
> To unsubscribe from Error LNK1120: 314 unresolved externals - When 
> using Ogr C++ class on Visual Studio 2010, click here.
> NAML 
> <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> 
>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: Error LNK1120: 314 unresolved 
> externals - When using Ogr C++ class on Visual Studio 2010 
> <http://osgeo-org.1560.n6.nabble.com/Error-LNK1120-314-unresolved-externals-When-using-Ogr-C-class-on-Visual-Studio-2010-tp4988103p4988131.html>
> Sent from the GDAL - Dev mailing list archive 
> <http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html> at 
> Nabble.com.
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
Hi,

After linking, you can use only exported classes and methods. It seems 
to me you try to use not exported method. Maybe some your code can help.

Best regards,
     Dmitry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120713/027e2781/attachment-0001.html>


More information about the gdal-dev mailing list