有人能给出一个逐步的过程如何安装剪辑,然后剪贴画在linux环境中。pip install clipspy不适合我,因为在我的组织中不允许使用pip。我需要从源头上建造。
我尝试了python setup.py install从clipspy-0.3.0,但编译终止。
gcc -pthread -B /anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /clips_core_source_630/core/ -fPIC -Ic -Itmpclips_core_source_630core -I/anaconda3/include/python3.6m -c build/temp.linux-x86_64-3.6/_clips.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_clips.o
build/temp.linux-x86_64-3.6/_clips.c:523:19: fatal error: clips.h: No such file or directory
#include <clips.h>
^
compilation terminated.我知道我必须安装clips_6.30,但是在src代码中有很多make文件
clips_core_source_630/makefiles> ls makefile.g++ makefile.gcc makefile.lib makefile.lib++ makefile.win
我对c/c++技术没有经验,也无法理解clips_core_source_630中的各种制作文件。
发布于 2018-12-26 10:12:52
您可以查看clipspy travis装置脚本作为参考示例。
解压缩剪辑存档后,可以在源文件夹中复制makefile.lib文件。
然后,您需要稍微修改Makefile,以将剪辑构建为共享库。为此,请将-fPIC标志添加到gcc编译命令中。这将产生几个适合包含在库中的.o文件。
使用make命令构建源代码。然后,可以将对象文件链接到一起以生成库文件。
ld -G *.o -o libclips.so一旦完成,您就可以构建和安装clipspy,确保您拥有最新的cffi和setuptools Python模块。
python setup.py build_ext --include-dirs <clips_dir>/core/ --library-dirs <clips_dir>/core/
python setup.py installhttps://stackoverflow.com/questions/53928786
复制相似问题