<HTML dir=ltr><HEAD><TITLE>Re: [Liblas-devel] c liblas problem</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.3790.4589" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText37552 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Well -- this little program compiles just fine with "cc -o myprog myprog.c -llas"</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Examining liblas.a I see both C and C++ routines in there.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Am I missing something?</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr>#include<stdio.h><BR>#include "liblas/capi/liblas.h"</DIV>
<DIV dir=ltr>int main(int argc, char** argv)<BR>{<BR> int i;<BR> LASReaderH reader = LASReader_Create(argv[1]);<BR> LASHeaderH header = LASReader_GetHeader(reader);<BR> int count=LASHeader_GetPointRecordsCount(header);<BR> LASPointH point;<BR> for(i=0;i<count;i++) {<BR> double x,y,z;<BR> point = LASReader_GetNextPoint(reader);<BR> x = LASPoint_GetX(point);<BR> y = LASPoint_GetY(point);<BR> z = LASPoint_GetZ(point);<BR> printf("%f %f %f\n",x,y,z);<BR> }<BR> LASReader_Destroy(reader);<BR> return 0;<BR>}<BR></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT> </DIV></DIV>
<DIV id=idSignature2441 dir=ltr>
<DIV><FONT face=Arial color=#000000 size=2>Michael D. Black</FONT></DIV>
<DIV><FONT face=Arial size=2>Senior Scientist</FONT></DIV>
<DIV><FONT face=Arial size=2>Northrop Grumman Mission Systems</FONT></DIV>
<DIV> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Mateusz Loskot [mailto:mateusz@loskot.net]<BR><B>Sent:</B> Wed 10/28/2009 2:49 PM<BR><B>To:</B> Black, Michael (IS)<BR><B>Cc:</B> Riki Tiki; liblas-devel@lists.osgeo.org<BR><B>Subject:</B> Re: [Liblas-devel] c liblas problem<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Black, Michael (IS) wrote:<BR>> I already communicated with Riki and solved his problem.<BR><BR>OK, thanks.<BR><BR>> He's running Linux<BR>> <BR>> cc -o myprog mprog.c -llas<BR><BR>Yes, this command is not enough.<BR>This links only against C++ API, but C API is a separate library.<BR><BR>Best regards,<BR>--<BR>Mateusz Loskot, <A href="http://mateusz.loskot.net/">http://mateusz.loskot.net</A><BR>Charter Member of OSGeo, <A href="http://osgeo.org/">http://osgeo.org</A><BR></FONT></P></DIV></BODY></HTML>