Hi Raphael,<br><br>It seems that the original Visual C++ shapelib project preprocessor definitions are invalid. (generated shapelib.lib and shapelib.dll symbols are incompatible)<br><br>Please try as follows,<br>1. modify shapelib project C/C++ preprocessor definition from VC property page<br>
   SHPAPI_CALL=__stdcall<br>     --&gt; SHAPELIB_DLLEXPORT<br>2. modify each source files(dbfopen.c/shpopen.c/shptree.c) C/C++ preprocessor definition from VC property page<br>  SHAPELIB_EXPORTS;SHPAPI_CALL=__stdcall;$(NoInherit)<br>
     --&gt; SHAPELIB_DLLEXPORT<br>3. rebuild shapelib project.<br>4. import generated shapelib.lib to your project and build.<br><br>Regards,<br><br>Sanak.<br><br><div class="gmail_quote">2009/6/21 raphael_mws <span dir="ltr">&lt;<a href="mailto:r.speck@minewolf.com">r.speck@minewolf.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi folks,<br>
<br>
I am having a real hard time including the shapelib.dll in my VC++ 2008<br>
project. I did the following:<br>
<br>
- recompile the Visual C++ shapelib project from<br>
<a href="http://dl.maptools.org/dl/shapelib/contrib/DotNetArchive.zip" target="_blank">http://dl.maptools.org/dl/shapelib/contrib/DotNetArchive.zip</a>. This worked<br>
fine, and I got the output dll and lib files.<br>
<br>
- include the shapefil.h in my .cpp file successfully<br>
<br>
- tried various possibilities to get the shapelib.dll in the correct PATH.<br>
Actually, it should be found by the compiler, I even tried putting it into<br>
C:\WINDOWS\system32 to make sure that&#39;s not the problem.<br>
<br>
- experimented with various combinations of __declspec( dllimport ) to<br>
import the functions from the dll<br>
<br>
When I try to compile, I always get the following error:<br>
&quot;error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;_SHPOpen&quot; in<br>
Funktion &quot;_wmain&quot;.&quot;<br>
(in English: unreferenced extern symbol &quot;... )<br>
<br>
Can anybody please give me a hint what I might be doing wrong? Or, even<br>
better, send me a sample VC project using shapelib.dll?<br>
<br>
Thanks and kind regards,<br>
Raphael<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Including-shapelib.dll-in-Visual-C%2B%2B-2008-Express-project-tp24132517p24132517.html" target="_blank">http://www.nabble.com/Including-shapelib.dll-in-Visual-C%2B%2B-2008-Express-project-tp24132517p24132517.html</a><br>

Sent from the ShapeLib mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Shapelib mailing list<br>
<a href="mailto:Shapelib@lists.maptools.org">Shapelib@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/shapelib" target="_blank">http://lists.maptools.org/mailman/listinfo/shapelib</a><br>
</font></blockquote></div><br>