[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 03:43:29 PDT 2012


13.07.2012 14:18, taibc ?????:
> Hi Dmitry,
>
> After modifying as you said, I got many errors like below:
>
> error LNK2019: unresolved external symbol _CSLPartialFindString 
> referenced in function "public: int __thiscall 
> CPLStringList::PartialFindString(char const *)const " 
> (?PartialFindString at CPLStringList@@QBEHPBD at Z)
> Thanks and regards,
>
> Tai
> ------------------------------------------------------------------------
> *From:* Dmitry Baryshnikov [via OSGeo.org] <[hidden email] 
> </user/SendEmail.jtp?type=node&node=4988184&i=0>>
> *To:* taibc <[hidden email] 
> </user/SendEmail.jtp?type=node&node=4988184&i=1>>
> *Sent:* Friday, July 13, 2012 5:03 PM
> *Subject:* Re: Error LNK1120: 314 unresolved externals - When using 
> Ogr C++ class on Visual Studio 2010
>
> 13.07.2012 13:55, taibc ?????:
>> Hi,
>>
>> Although, I added 'gdal_i.lib' in Properties (Linker 
>> ->Input->Additional Dependencies) and this file in Debug folder, but 
>> I got an other errror:
>>
>> error LNK1104: cannot open file 'gdal_i.lib'
>>
>> Do you know how to fix it ?
>>
>> Thanks and regards,
>>
>> Tai
>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>> Hi,
>>
>> You mast remove any cpl_*.cpp and any gdal headers from your 
>> solution. In project properties you have to put path to gdal headers 
>> (gdal_root/port, gdal_root/gcore, gdal_root/ogr)
>> E.g. for GDALVersionInfo function you have to include only in your 
>> code #include "gdal.h"
>>
>> 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-tp4988103p4988142.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-tp4988103p4988177.html>
>> Sent from the GDAL - Dev mailing list archive 
>> <http://osgeo-org.1560.n6.nabble.com/GDAL-Dev-f3742093.html> at 
>> Nabble.com <http://nabble.com/>.
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> Put there (Linker ->Input->Additional Dependencies) the full path to 
> gdal_i.lib or add the path to gdal_i.lib in Linker 
> ->General->AdditionalLibraryDirectories
>
> 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-tp4988103p4988180.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-tp4988103p4988184.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 Tai,

Please post your code and screenshots of project tree and properties 
Linker ->Input and C/C++ -> Preprocessor definitions

Best regards,
        Dmitry

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


More information about the gdal-dev mailing list