概述
python3.7 在centos下,编译安装的时候,出现了错误提示 “INFO: Could not locate ffi libs and/or headers”, 安装与一下即可。yum install libffi-devel
yum install libffi-devel
高级语言编译器生成遵循某些约定的代码。这些约定在一定程度上是独立的编译工作的必要条件。这样的约定就是“召集公约”。“调用约定”是由编译器做出的一组假设,这些假设是关于函数参数在函数的输入中将在哪里找到的。一个“调用约定”还指定了函数返回值的位置。
有些程序可能在编译时不知道要传递给函数的参数。例如,解释器可以在运行时被告知用于调用给定函数的参数的数量和类型。LBFFI可用于这样的程序,以提供从解释器程序到编译代码的桥梁。
LBFFI库为各种调用约定提供了一个可移植的、高层次的编程接口。这允许程序员在运行时调用由调用接口描述指定的任何函数。
FFI代表外部功能接口。外部函数接口是接口的流行名称,它允许用一种语言编写的代码调用用另一种语言编写的代码。LIBFFI库只提供了全功能的外部功能接口的最低的、依赖于机器的层。必须在LBFFI之上存在一层,该层处理两种语言之间传递的值的类型转换。
原文
Compilers for high level languages generate code that follows certain conventions. These conventions are necessary, in part, for separate compilation to work. One such convention is the "calling convention". The "calling convention" is a set of assumptions made by the compiler about where function arguments will be found on entry to a function. A "calling convention" also specifies where the return value for a function is found.
Some programs may not know at the time of compilation what arguments are to be passed to a function. For instance, an interpreter may be told at run-time about the number and types of arguments used to call a given function. Libffi can be used in such programs to provide a bridge from the interpreter program to compiled code.
The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run-time.
FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language. The libffi library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. A layer must exist above libffi that handles type conversions for values passed between the two languages.
最后
以上就是野性书包为你收集整理的python编译安装error ffi ctype_python3.7 编译错误 “INFO: Could not locate ffi libs and/or headers”...的全部内容,希望文章能够帮你解决python编译安装error ffi ctype_python3.7 编译错误 “INFO: Could not locate ffi libs and/or headers”...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复