Page 1 of 1

Comple with laslib

Posted: Tue Mar 07, 2017 2:28 pm
by snfge
when I use cmake and with laslib, the error show, but if I not with laslib, there no error appear, why?


Could not find the following static Boost libraries:

boost_program_options
boost_thread

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
contrib/LiblasSupport.cmake:18 (find_package)
contrib/AllSupport.cmake:4 (include)
CMakeLists.txt:97 (include)

Re: Comple with laslib

Posted: Tue Mar 07, 2017 2:29 pm
by snfge
The folder have the files

Re: Comple with laslib

Posted: Tue Mar 07, 2017 6:37 pm
by daniel
Laslib requires BOOST, that's why you need to set it up properly when you link laslib with CC.

And if CMake can't find the right libraries, it's maybe because the ones present in the folder you set are not the right ones (check whether they are release or debug, static or dynamic, etc.). Boost is a monster that's hard to tame.

Personally I compiled liblas myself, and I have not used the one shipped with osgeo4w.

Re: Comple with laslib

Posted: Wed Mar 08, 2017 12:58 am
by snfge
I change something ,so it can complied , but when I run CC, I can see the las in the support list, but it can open the file, the error is "the third-party library in charge of saving/loading the file has failed to perform the operation".

Re: Comple with laslib

Posted: Wed Mar 08, 2017 8:04 pm
by daniel
In this case, it may be because the LAS file version is to advanced (1.3+). You can test with the official Windows version and see if the other file filter ('LAS 1.3 or 1.4' - based on LASlib and not libLAS ;) works.

Re: Comple with laslib

Posted: Thu Mar 09, 2017 1:02 am
by snfge
Yes, you are right, I use the liblas, not laslib, but when I use the liblas, the error appear, this hpp files can't find:
#include <liblas/point.hpp>
#include <liblas/reader.hpp>
#include <liblas/writer.hpp>
#include <liblas/factory.hpp> // liblas::ReaderFactory
#include <liblas/header.hpp>

Re: Comple with laslib

Posted: Thu Mar 09, 2017 10:14 am
by daniel
Didn't you say in your previous message that you were able to compile CC with liblas?!

Re: Comple with laslib

Posted: Thu Mar 09, 2017 12:59 pm
by snfge
Hi
I am sorry, I mean is when I use laslib, but in CC at lasfilter.cpp, it need include<liblas/point.hpp>, but the laslib not have the file, so I don't konw how to do it