我尝试为64位Windows交叉编译libplist(https://github.com/libimobiledevice/libplist)并从中创建一个DLL。我在Windows 10(Ubuntu 14.04 bash)上为Linux子系统下载了mingw-w64并设置了环境变量(CC,CXX,CPP,RANLIB)。我使用./autogen.sh --host=x86_64-w64-mingw32
来配置软件包。然而,它与错误退出:Windows交叉编译Python错误
configure:16825: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
在config.log
它说:
configure:16813: x86_64-w64-mingw32-gcc -o conftest.exe -g -O2 -I/usr/include/python2.7 -I/usr/include/x86_64-linux-g$
In file included from /usr/include/python2.7/Python.h:8:0,
from conftest.c:33:
/usr/include/python2.7/pyconfig.h:78:3: error: #error unknown multiarch location for pyconfig.h
# error unknown multiarch location for pyconfig.h
^
In file included from /usr/include/python2.7/pyport.h:4:0,
from /usr/include/python2.7/Python.h:58,
from conftest.c:33:
/usr/include/python2.7/pyconfig.h:78:3: error: #error unknown multiarch location for pyconfig.h
# error unknown multiarch location for pyconfig.h
^
In file included from /usr/include/python2.7/pymath.h:4:0,
from /usr/include/python2.7/Python.h:77,
from conftest.c:33:
/usr/include/python2.7/pyconfig.h:78:3: error: #error unknown multiarch location for pyconfig.h
# error unknown multiarch location for pyconfig.h
^
configure:16813: $? = 1
当我尝试编译它为Linux它不返回这个错误,所以我想这是因为它需要为Windows x86_64编译的python库。我从C:/Python27/include
复制了Windows中相应的文件,并尝试分别为配置LDFLAGS="-L/path/to/python/include"
和PKG_CONFIG_PATH=/path/to/python/include
设置环境变量。他们都没有工作。我还注意到,在C:/Python27/include
还有一个文件叫pyconfig.h
。为什么脚本使用Linux上安装的那个?有没有办法强迫它使用另一个?
我的主要目标是从libusbmuxd(https://github.com/libimobiledevice/libusbmuxd)制作一个64位的Windows DLL,但它也需要编译libplist。我怎么能解决这个问题?提前感谢您的答复。