Hi <br><br>Now I found the way to call the shapelib functions to my program in C++.<br>There is a sample of my little code, well I took the code from a shpcreat.c and rename it as shpcreate.cpp<br><br>[Code]<br>static char rcsid[] = <br>
&nbsp; &quot;$Id: shpcreate.c,v 1.5 2002/01/15 14:36:07 warmerda Exp $&quot;;<br>#include &lt;iostream&gt;<br>#include &lt;cstdlib&gt;<br>#include &quot;shapefil.h&quot;<br>#include &quot;string.h&quot;<br><br><br>using namespace std;<br>
int main()<br><br>{<br>&nbsp;&nbsp;&nbsp; SHPHandle&nbsp;&nbsp;&nbsp; hSHP;<br>&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nShapeType;<br>&nbsp;&nbsp;&nbsp; string&nbsp; shape_name;<br><br>//Here the program ask for a name <br>&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;Name of the new shapefile?: &quot; &lt;&lt; endl;<br>
&nbsp;&nbsp;&nbsp; getline(cin,shape_name);<br><br>&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;The program will show the name of the shapefile: &quot; &lt;&lt; nombre_archivo &lt;&lt; endl;<br><br>//Here the program creates the shapefile. Gives a name and a type<br>
&nbsp;&nbsp;&nbsp; nShapeType=5;<br>&nbsp;&nbsp;&nbsp; hSHP = SHPCreate( shape_name.c_str(), nShapeType );<br><br>&nbsp;&nbsp;&nbsp; SHPClose( hSHP );<br><br>&nbsp;&nbsp;&nbsp; return 0;<br>}<br>[/CODE]<br><br>This little program runs in windows with the library in dll and in linux, but under Linux I must generate and shpopen.o and after compile in this way.<br>
<br>g++ -g shpcreate.cpp shpopen.o -o myprogram<br><br>And I have a good result. <br><br>The secret was to put include these libraries: cstdlib and string.h. <br><br>The way is very easy. <br>Now I have another problem, but I&#39;ll try to solve it myself and if I have can&#39;t I&#39;ll ask :)<br>
<br>See you.<br><br>Thanks<br><br><br>