libffi

Problems installing Common Lisp Sketch into Windows 10

感情迁移 提交于 2019-12-07 09:15:30
I had trouble getting through errors for missing SDL DLL's and an FFI.H file while installing sketch with quicklisp. Posting my solution for this Windows 10 specific trouble, maybe there are other solutions too. I ended up using Chocolatey and Cmder for my mingw64 environment. This is what I had to do in order to get through several errors for missing SDL DLL's and FFI.H header. 1. Install Cmder using Chocolatey: https://chocolatey.org/packages/Cmder 2. Download and copy all the SDL, SDL_image and SDL_ttf DLL's to SBCL's .exe folder: a. https://www.libsdl.org/download-2.0.php b. https://www

How can I write a generic C function for calling a Win32 function?

旧时模样 提交于 2019-12-06 00:52:49
问题 To allow access to the Win32 API from a scripting language (written in C), I would like to write a function such as the following: void Call(LPCSTR DllName, LPCSTR FunctionName, LPSTR ReturnValue, USHORT ArgumentCount, LPSTR Arguments[]) which will call, generically, any Win32 API function. (the LPSTR parameters are essentially being used as byte arrays - assume that they have been correctly sized to take the correct data type external to the function. Also I believe that some additional

Passing structs by value with cffi-libffi?

强颜欢笑 提交于 2019-12-05 19:34:39
I'm under the impression that CFFI cant pass structs by value, but the CFFI documentation says: To pass or return a structure by value to a function, load the cffi-libffi system and specify the structure as (:struct structure-name) . To pass or return the pointer, you can use either :pointer or (:pointer (:struct structure-name)) . I'm re-wrapping the cl-opencv function get-size , which is a wrapper for this opencv function: CvSize cvGetSize(const CvArr* arr) and since I don't think CFFI had the ability to pass structs by value with the cffi-libffi system when the author of cl-opencv wrote the

Problems with custom LIBFFI Heroku buildpack

别来无恙 提交于 2019-12-04 13:32:50
问题 I'm trying to deploy my app to Heroku. It is using pyOpenSSL , which requires cryptography , which requires libffi . I found a custom buildpack that includes libffi here: https://github.com/mfenniak/heroku-buildpack-python-libffi. However, cryptography cannot seem to find libffi even though it's on LD_LIBRARY_PATH : $ heroku run bash heroku> echo $LD_LIBRARY_PATH /app/.heroku/vendor/lib:/app/vendor/libffi-3.0/lib heroku> ls /app/vendor/libffi-3.0/lib libffi-3.0.13 libffi.a libffi.la libffi.so

How can I write a generic C function for calling a Win32 function?

那年仲夏 提交于 2019-12-04 06:26:16
To allow access to the Win32 API from a scripting language (written in C), I would like to write a function such as the following: void Call(LPCSTR DllName, LPCSTR FunctionName, LPSTR ReturnValue, USHORT ArgumentCount, LPSTR Arguments[]) which will call, generically, any Win32 API function. (the LPSTR parameters are essentially being used as byte arrays - assume that they have been correctly sized to take the correct data type external to the function. Also I believe that some additional complexity is required to distinguish between pointer and non-pointer arguments but I'm ignoring that for

Compiling libffi with VS2012 fails with fatal error LNK1281: Unable to generate SAFESEH image

若如初见. 提交于 2019-12-04 02:24:28
Compiling libffi with VS11 gives the following linker error libffi\libffi-3.0.9\ms\Win32\Debug\ffi.dll : fatal error LNK1281: Unable to generate SAFESEH image. The same project was compiling fine with VS10, but after an auto upgrade with VS2012, it started giving linker error The Explanation in MSDN is too cryptic and least helpful I might rebuild with /SAFESEH:NO , but I am unsure of the implication. Please advise what might go wrong. The main implication of not having SAFESEH is that your application won't be accepted for the Windows 8 store, or for Windows 8 desktop certification . If that

Problems with custom LIBFFI Heroku buildpack

给你一囗甜甜゛ 提交于 2019-12-03 09:29:35
I'm trying to deploy my app to Heroku. It is using pyOpenSSL , which requires cryptography , which requires libffi . I found a custom buildpack that includes libffi here: https://github.com/mfenniak/heroku-buildpack-python-libffi . However, cryptography cannot seem to find libffi even though it's on LD_LIBRARY_PATH : $ heroku run bash heroku> echo $LD_LIBRARY_PATH /app/.heroku/vendor/lib:/app/vendor/libffi-3.0/lib heroku> ls /app/vendor/libffi-3.0/lib libffi-3.0.13 libffi.a libffi.la libffi.so libffi.so.6 libffi.so.6.0.1 pkgconfig However, I'm not sure LD_LIBRARY_PATH is available during

centos7下面python3.7安装

时间秒杀一切 提交于 2019-11-30 05:27:22
我这里使用的是CentOS7,默认系统自带python2.7的版本,这个版本被系统很多程序所依赖,所以不建议删除,如果使用最新的Python3那么我们知道编译安装源码包和系统默认包之间是没有任何影响的,所以可以安装python3和python2共存 1、安装依赖包   1)首先安装gcc编译器,gcc有些系统版本已经默认安装,通过 gcc --version 查看,没安装的先安装gcc, yum -y install gcc   2)安装其它依赖包,(注:不要缺少,否则有可能安装python出错,python3.7.0以下的版本可不装 libffi-devel ) yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel 2、下载python3.7.0源码,根据需求下载   1)在https://www.python.org/ftp/python/中选择自己需要的python源码包,我下载的是python3.7.0   2)下载 wget https://www.python.org/ftp/python/3.7.0

Centos7 安装Python3

白昼怎懂夜的黑 提交于 2019-11-29 06:26:25
1.查看当前机器Python版本 及安装位置 机器自带python2.7 python --version which python 2.安装编译环境 yum -y groupinstall "Development tools" yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel 3.下载并解压python3 源码包 wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz xz -d Python-3.7.2.tar.xz tar -xvf Python-3.7.2.tar 4.进入目录执行编译命令 cd Python-3.7.2 ./configure --prefix=/usr/local/python3 make && make install 5.修改系统默认python版本 #备份默认python2链接 mv python python.bak #生成python3链接 ln -s /usr/local/python3/bin/python3 /usr/bin

centos7下面python3.7安装

若如初见. 提交于 2019-11-28 09:39:39
我这里使用的是CentOS7,默认系统自带python2.7的版本,这个版本被系统很多程序所依赖,所以不建议删除,如果使用最新的Python3那么我们知道编译安装源码包和系统默认包之间是没有任何影响的,所以可以安装python3和python2共存 1、安装依赖包   1)首先安装gcc编译器,gcc有些系统版本已经默认安装,通过 gcc --version 查看,没安装的先安装gcc, yum -y install gcc   2)安装其它依赖包,(注:不要缺少,否则有可能安装python出错,python3.7.0以下的版本可不装 libffi-devel ) yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel 2、下载python3.7.0源码,根据需求下载   1)在https://www.python.org/ftp/python/中选择自己需要的python源码包,我下载的是python3.7.0   2)下载 wget https://www.python.org/ftp/python/3.7.0