<div dir="ltr"><div><div><div><div><div><div>Oui. Pardon!! Je pensais que ce choix n'était que pour localiser les utilisateurs dans le besoin...<br><br></div>Bon, pour ceux qui n'auraient pas compris mon super anglais, je suis en difficulté. Cela fait plus de deux semaines que je cherche à manipuler des shapefiles (ESRI shapefile). Et il se pourrait que les librairies ShapeLib et GDAL_OGR me conviennent. Or, je n'arrive pas à les utiliser ni dans QtCreator, ni avec Visual Studio 2008. Idéalement, je travaillerai sous Visual Studio ayant déjà une licence. <br>

<br></div>J'ai suivi les instructions du lien suivant :  <a href="http://trac.osgeo.org/gdal/wiki/BuildingOnWindows" target="_blank">http://trac.osgeo.org/gdal/wiki/BuildingOnWindows</a> pour installer GDAL sous Windows. J'ai essayé de deux façons : en utilisant les libraires "pré construites" qui sont proposées, et en construisant la libraire moi-même (en choisissant préalablement la version qui me convient ici  <a href="http://www.gisinternals.com/sdk/" style="font-family:Calibri,sans-serif;font-size:11pt;line-height:115%" target="_blank">http://www.gisinternals.com/sdk/</a> ). Dans les deux cas, j'ai des erreurs de linkages du type  " LNK2001 unresolved external symbol ". Je pense pourtant avoir bien relié ma librairie à mon projet ( Projet > Propriété de mon projet > Propriétés de configuration > C/C++ > Général > Autres répertoires include > Chemin\vers\mes *.h , puis Projet > Propriété de mon projet > Propriétés de configuration >Editeur de liens > Général > Répertoires de bibliothèque supplémentaire > chemin\vers\ma bibliothèque.lib puis Projet > Propriété de mon projet > Propriétés de configuration >Editeur de liens > Entrée > Dépendances supplémentaires > malibrairie.lib). <br>

<br></div>Alors, je me suis demandée s'il fallait que je lie aussi mon projet avec ma *.dll. J'ai donc ajouté un chemin vers une référence dans Projet > Propriété de mon projet > Propriétés communes > chemin\vers\ma librairie.dll , mais je ne pense pas que ce soit utile de lier à la fois à la .*dll et à la *.lib. Peu importe, cela ne fonctionne toujours pas. Mais mon erreur est bien une erreur de linkage. J'ai alors voulu utiliser   des #import *.dll et/ou des  #unsing *.dll ou dllimport dllexport, mais je n'ai pas vraiment saisi comment les utiliser (en regardant sur ce site : <a href="http://msdn.microsoft.com/fr-fr/" target="_blank">http://msdn.microsoft.com/fr-fr/</a> ).<br>
<br></div>Si quelqu'un sait ce que je fais mal, ou à réussi à les utiliser, pourrait-il me conseiller s'il vous plait?<br><br></div>Merci d'avance, <br></div>Marion.<br><div><div><div><div><div><br></div></div>
</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 10:05 AM, Yves Jacolin (Free) <span dir="ltr"><<a href="mailto:yjacolin@free.fr" target="_blank">yjacolin@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Marion,<br>
<br>
La liste Francophone est une liste où l'on écrit en français ;)<br>
<br>
Tu peux aussi poser ta question sur un forum francophone comme GeoRezo<br>
(<a href="http://georezo.net" target="_blank">http://georezo.net</a>, forum Geolibre).<br>
<br>
Y.<br>
Le mardi 9 avril 2013 22:57:07 MARION VIOLOT a écrit :<br>
<div class="HOEnZb"><div class="h5">> Hello everyone,<br>
><br>
> I have tried for at least two weeks to find a way to manipulate shapefiles<br>
> in a project in Visual Studio C++. I found two libraries (GDAL_OGR and<br>
> Shapelib) which could help me to do it, but I failed at using them with VS<br>
> C++ 2008.<br>
><br>
> Indeed, I follow this link :<br>
> <a href="http://trac.osgeo.org/gdal/wiki/BuildingOnWindows" target="_blank">http://trac.osgeo.org/gdal/wiki/BuildingOnWindows</a> and tried to used the<br>
> prebuild libraries as well as built it myself (by first choosing version of<br>
> GDAL here : <a href="http://www.gisinternals.com/sdk/" target="_blank">http://www.gisinternals.com/sdk/</a>), but I have same errors which<br>
> is a LNK2001 unresolved external symbol. I thought I linked well the<br>
> gdal_i.lib ( Project Properties > Linking Options > Additional Librairy ><br>
> Path to gdal_i.lib, I also add gdal_i.lib (only the name) where I have to,<br>
> and add the path to my includes files also in Project Properties > C++/C<br>
> Options).<br>
><br>
> I thought may be I have to add reference to my gdal.dll. So I added the<br>
> path of bin\gdal.dll to the option Add path reference. But I had the same<br>
> error. I was thinking about use #import *.dll and/or #unsing *.dll but I<br>
> don't really understand how doing this (I looked through<br>
> <a href="http://msdn.microsoft.com/fr-fr/" target="_blank">http://msdn.microsoft.com/fr-fr/</a> ). Anyway, it might be unuseful as I<br>
> already linked my *.lib, isn't it?<br>
><br>
> So I tried to use Shapelib dowloaded from here, but I just failed to build<br>
> the library as it seems some *.h are missing.<br>
><br>
> If you have any advice, I would be very releaved and of course grateful.<br>
><br>
> Thank you in advance.<br>
> Marion.<br>
</div></div></blockquote></div><br></div>