Well -- this little program compiles just fine with "cc -o myprog myprog.c 
-llas"
Examining liblas.a I see both C and C++ routines in there.
Am I missing something?
 
#include<stdio.h>
#include "liblas/capi/liblas.h"
int main(int argc, char** argv)
{
 int i;
 LASReaderH reader = LASReader_Create(argv[1]);
 LASHeaderH header = LASReader_GetHeader(reader);
 int count=LASHeader_GetPointRecordsCount(header);
 LASPointH point;
 for(i=0;i<count;i++) {
        double x,y,z;
        point = LASReader_GetNextPoint(reader);
        x = LASPoint_GetX(point);
        y = LASPoint_GetY(point);
        z = LASPoint_GetZ(point);
        printf("%f %f %f\n",x,y,z);
 }
 LASReader_Destroy(reader);
 return 0;
}

 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 

________________________________

From: Mateusz Loskot [mailto:[email protected]]
Sent: Wed 10/28/2009 2:49 PM
To: Black, Michael (IS)
Cc: Riki Tiki; [email protected]
Subject: Re: [Liblas-devel] c liblas problem



Black, Michael (IS) wrote:
> I already communicated with Riki and solved his problem.

OK, thanks.

> He's running Linux
> 
> cc -o myprog mprog.c -llas

Yes, this command is not enough.
This links only against C++ API, but C API is a separate library.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net <http://mateusz.loskot.net/> 
Charter Member of OSGeo, http://osgeo.org <http://osgeo.org/> 


_______________________________________________
Liblas-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/liblas-devel

Reply via email to