当前位置:网站首页>Visualstudio2019 compilation configuration lastools-v2.0.0 under win10 system
Visualstudio2019 compilation configuration lastools-v2.0.0 under win10 system
2022-07-06 01:50:00 【Dianyunxia】
Catalog
One 、 summary
1、LAStools-v2.0.0
For some historical reason ,LAStools The library is updated again . Last updated on :2022 year 1 month 7 Japan .LASTools Version is :220107. Due to some requests , Now let's use git Release the function .LASTools stay YYMMDD Version control is used in the scheme . This is for most LASTools It is very common for users , So keep this version number . Besides , We will follow the open source version git Version control guide . They may also flow into the source code later . Because we have something very similar to history , We directly from 2.0.0 edition Start .
2、 Download decompression
github link :https://github.com/LAStools/LAStools/releases/tag/v2.0.0
Download the contents in the red box and unzip 
Two 、 Source code compilation
2.1 open
Use VS2019 open lastools.dsw
Migrating solutions and projects 
When the following interface appears , Just click ok .
2.2 Remove the items that failed to load

2.3 Modify the code
open LASlib The header file mydefs.hpp, Locate the 69 That's ok , Only keep #if defined(_MSC_VER), Delete or comment other code in this line .
2.4 Configuration manager
The configuration process is shown in the figure below :

2.5 Modify the output directory
Right click LASlib— attribute — Configuration properties — routine — The output directory — It is amended as follows :
$(SolutionDir)$(ProjectName)\$(Configuration)\
2.6 Modify the header file directory
Right click LASlib— Configuration properties —C/C++— routine — Attach include directory — Delete “…\laszip\stl”
2.7 Modify the runtime
Right click LASlib— attribute —C/C++— Code generation — Runtime — choice “ Multithreading (/MD)”.(VS2019 The default is multithreading /MTd, before ,open3d When compiling, you choose Multithreading (/MD), Therefore, multi threading is also selected here (/MD))
2.8 Generate lib
Right click LASlib— To regenerate the . The following interface appears , be debug Mode lastools Compile successfully .
To configure release Pattern 
Right click LASlib— Configuration properties —C/C++— routine — Attach include directory — Delete “…\laszip\stl”
Right click LASlib— To regenerate the . The following interface appears , be release Mode lastools Compile successfully .
2.9 lib route
...\LAStools\LAStools\LASlib\lib

3、 ... and 、 Package into Library
- open LASlib—lib newly build Debug and Release Folder , take
LASlib.libPut in Release Folder , takeLASlibD.libPut in Debug Folder . - New folder LasLib, take
...\LAStools\LAStools\LASlibThe next path LASlib and lib Copy the folder and put it into the new folder . - take
...\LAStools\LAStools\LASzipThe next path src Copy the folder and put it into the new folder . Library encapsulation completed .
Four 、VS2019 Distribution Library
I am LASlib The path of is :
D:\Open3D_0.13.0\LASlib
- Configuration properties —C/C++— Code generation — Runtime , Multithreading (/MT), And steps 2.7 The settings are consistent .
- VC++ Catalog — Contains the directory
D:\Open3D_0.13.0\LASlib\include
D:\Open3D_0.13.0\LASlib\src
- VC++ Catalog — The library catalog
Release Pattern
D:\Open3D_0.13.0\LASlib\lib\Release
Debug Pattern
D:\Open3D_0.13.0\LASlib\lib\Debug
- Additional dependency
Release Pattern
LASlib.lib
Debug Pattern
LASlibD.lib
5、 ... and 、 Test code
#include <iostream> // C++
#include "lasreader.hpp"// LasReader
#include "open3d/geometry/PointCloud.h"// Open3D Point cloud file
#include "open3d/visualization/utility/DrawGeometry.h" // Open3D Visualization header file
using namespace std;
int main(int argc, char* argv[])
{
// ---------------------LASLib from las Read the point cloud in the file ---------------------------
LASreadOpener lasreadopener;
LASreader* lasReader = lasreadopener.open("R.las");
if (lasReader == 0)
{
fprintf(stderr, "ERROR: could not open lasreader\n");
}
printf("reading %I64d points from '%s'.\n", lasReader->npoints, lasreadopener.get_file_name());
// ------------------------Open3D Get point cloud coordinates ------------------------------
auto cloud = std::make_shared<open3d::geometry::PointCloud>();
int pointAmount = lasReader->npoints; // las The number of midpoint
cloud->points_.resize(pointAmount);
int i = 0;
while (lasReader->read_point() && i < pointAmount)
{
cloud->points_[i][0] = lasReader->point.get_X(); // Get point cloud X coordinate
cloud->points_[i][1] = lasReader->point.get_Y(); // Get point cloud Y coordinate
cloud->points_[i][2] = lasReader->point.get_Z(); // Get point cloud Z coordinate
++i;
}
// ------------------------Open3D Display point cloud coordinates ------------------------------
open3d::visualization::DrawGeometries({
cloud }, "PointCloud", 800, 600);
return 0;
}
6、 ... and 、 Result display
reading 595018 points from 'R.las'.

边栏推荐
- 【网络攻防实训习题】
- 使用npm发布自己开发的工具包笔记
- Internship: unfamiliar annotations involved in the project code and their functions
- 晶振是如何起振的?
- leetcode刷题_平方数之和
- Computer graduation design PHP college classroom application management system
- 干货!通过软硬件协同设计加速稀疏神经网络
- Kubernetes stateless application expansion and contraction capacity
- Genius storage uses documents, a browser caching tool
- 【Flask】响应、session与Message Flashing
猜你喜欢

Card 4G industrial router charging pile intelligent cabinet private network video monitoring 4G to Ethernet to WiFi wired network speed test software and hardware customization

【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
![[detailed] several ways to quickly realize object mapping](/img/e5/70c7f8fee4556d14f969fe33938971.gif)
[detailed] several ways to quickly realize object mapping

Computer graduation design PHP animation information website
![[flask] official tutorial -part2: Blueprint - view, template, static file](/img/bd/a736d45d7154119e75428f227af202.png)
[flask] official tutorial -part2: Blueprint - view, template, static file

How does the crystal oscillator vibrate?
![[机缘参悟-39]:鬼谷子-第五飞箝篇 - 警示之二:赞美的六种类型,谨防享受赞美快感如同鱼儿享受诱饵。](/img/3c/ec97abfabecb3f0c821beb6cfe2983.jpg)
[机缘参悟-39]:鬼谷子-第五飞箝篇 - 警示之二:赞美的六种类型,谨防享受赞美快感如同鱼儿享受诱饵。

Redis-字符串类型

一图看懂!为什么学校教了你Coding但还是不会的原因...

3D vision - 4 Getting started with gesture recognition - using mediapipe includes single frame and real time video
随机推荐
Basic operations of databases and tables ----- default constraints
Alibaba-Canal使用详解(排坑版)_MySQL与ES数据同步
Tensorflow customize the whole training process
Comments on flowable source code (XXXV) timer activation process definition processor, process instance migration job processor
Redis daemon cannot stop the solution
Leetcode skimming questions_ Sum of squares
Luo Gu P1170 Bugs Bunny and Hunter
Internship: unfamiliar annotations involved in the project code and their functions
Reasonable and sensible
genius-storage使用文档,一个浏览器缓存工具
[Yu Yue education] Liaoning Vocational College of Architecture Web server application development reference
selenium 元素定位(2)
Selenium element positioning (2)
[Jiudu OJ 09] two points to find student information
【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
抓包整理外篇——————状态栏[ 四]
[understanding of opportunity-39]: Guiguzi - Chapter 5 flying clamp - warning 2: there are six types of praise. Be careful to enjoy praise as fish enjoy bait.
XSS learning XSS lab problem solution
Blue Bridge Cup embedded_ STM32_ New project file_ Explain in detail
晶振是如何起振的?