curaengine编译源码之libarcus编译记录

libArcus的编译(成功安装)

This library contains C++ code and Python3 bindings for creating a socket in a thread and using this socket to send and receive messages based on the Protocol Buffers library. It is designed to facilitate the communication between Cura and its backend and similar code.

翻译:
Arcus这个库(包含C++代码和Python3绑定),用于在线程中创建套接字,并使用这个套接字基于Protocol Buffers库发送和接收消息。它的设计目的是促进Cura与其后端以及类似代码之间的通信。

Building
To build the library, the following packages are needed:

编译

要编译这个库,需要以下软件包:

1、Protobuf 3 (3.0+)

注意版本要与libarcus的匹配,我下载的5.0版本,要求3.17版本以上,但注意3.20以上的话有几个函数参数要变(减掉一个参数就行)

2、Cmake

CMake To build the python bindings (default on, disable with -DBUILD_PYTHON=OFF) these additional libries are needed:

(1)python3-dev (3.4+)

注意cmakelist里面的python路径要和下载的版本一致

(2)python3-sip-dev (4.16+)

注意这个sip包,名字不一定叫这个,这个只是linux用aptget的叫的名字,比如windows下python安装命令 pip install sip安装的就叫sipbuild,注意下载后要把名字改成sip
注意cmakelist里的find包里的名字要和这个sip包名一致。

(3)下载了sip却ModuleNotFoundError: No module named ‘sip’

这个应该是包名不同,包sipbuild应该改成sip,同时把包sip-版本号.dist-info内的有个toplevel的txt文件内容改成现在的包名sip
可以敲以下命令检测sip模块是否安装好:
验证 sip 是否可导入:

bash

python3.9 -c "import sip; print(sip.__file__)"

如果没有错误,并且显示了 sip 模块的路径,那么说明 sip 已经可以被Python解释器正确导入。

如果你仍然遇到问题,可能需要检查你的Python安装是否完整,或者考虑重新安装 sip 和相关的绑定库(如PyQt或PySide)。确保你使用的是与你的Python版本兼容的库版本

3、流程

Building the library can be done with:
编译的是5.0以下version,注意main版本不能用这套

$ mkdir build && cd build
$ cmake ..
$ make
$ make install
最难的就是cmake这一步,经常报错,一般都是缺包或者版本不匹配。

相关推荐

  1. curaengine编译libarcus编译记录

    2024-04-09 09:24:03       40 阅读
  2. Webrtc编译个人仓库

    2024-04-09 09:24:03       25 阅读
  3. 记录 | 编译Arm CPU版FFmpeg

    2024-04-09 09:24:03       67 阅读
  4. openwrt编译

    2024-04-09 09:24:03       63 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-09 09:24:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-09 09:24:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-09 09:24:03       82 阅读
  4. Python语言-面向对象

    2024-04-09 09:24:03       91 阅读

热门阅读

  1. 如何创建Windows下google Chrome便携版?

    2024-04-09 09:24:03       36 阅读
  2. Golang 中 在gmp下,mutex 是如何并发的

    2024-04-09 09:24:03       36 阅读
  3. tab切换 vue

    2024-04-09 09:24:03       35 阅读
  4. Django中models的使用

    2024-04-09 09:24:03       35 阅读
  5. C++数字化声音信号处理和数控振荡合成

    2024-04-09 09:24:03       40 阅读
  6. react native 图片预览

    2024-04-09 09:24:03       33 阅读
  7. Linux Centos 安装Jenkins

    2024-04-09 09:24:03       37 阅读
  8. linux centos 定时任务,执行shell脚本

    2024-04-09 09:24:03       42 阅读
  9. terraform 阿里云创建ECS使用user_data

    2024-04-09 09:24:03       40 阅读
  10. R语言序列8——RMarkdown与数据报告自动化

    2024-04-09 09:24:03       36 阅读