emscripten-core / emscripten-core/emscripten
Compile the libraries error
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hello guys, I want to compile a c++ file and use it in my web project. The file looks like
```
#include
#include
#include
#include
int main() {
// 读入点云
pcl::PointCloud::Ptr cloud(new pcl::PointCloud);
pcl::io::loadPCDFile("table_scene_lms400.pcd", *cloud);
// 降采样
pcl::VoxelGrid sor;
sor.setInputCloud(cloud);
sor.setLeafSize(0.1f, 0.1f, 0.1f);
pcl::PointCloud::Ptr cloud_filtered(new pcl::PointCloud);
sor.filter(*cloud_filtered);
// 平滑处理
pcl::StatisticalOutlierRemoval sor2;
sor2.setInputCloud(cloud_filtered);
sor2.setMeanK(50);
sor2.setStddevMulThresh(1.0);
pcl::PointCloud::Ptr cloud_smoothed(new pcl::PointCloud);
sor2.filter(*cloud_smoothed);
// 将处理后的点云保存为PCD文件
pcl::io::savePCDFile("output.pcd", *cloud_smoothed);
std::cout << "savePCDFile to output.pcd";
return 0;
}
```
The only library I included is [pcl](https://github.com/PointCloudLibrary/pcl)
I can compile it by the command:
```
g++ -o hello hello.cpp -I/usr/include/pcl-1.8 -I/usr/include/eigen3 -L/usr/lib/x86_64-linux-gnu -lboost_system -lpcl_io -lpcl_common -lpcl_filters
```
**Version of emscripten/emsdk:**
Please include the output `emcc -v` here
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.34 (57b21b8fdcbe3ebb523178b79465254668eab408)
clang version 17.0.0 (https://github.com/llvm/llvm-project a031f72187ce495b9faa4ccf99b1e901a3872f4b)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/ubuntu/Documents/EBS1/Shen/emsdk/upstream/bin
```
**Failing command line in full:**
I saw the tutorial, it should have to compile the library first, then I try to compile the pcl library, but they don't have the configure file. Is there any possible to generate configure file or any other way to compile the project use the CMAKELIST.txt?
**Full link command and output with `-v` appended:**
the [pcl lib](https://github.com/PointCloudLibrary/pcl)
Contributor guide
Assessment
This issue has not been assessed yet.