libplist ( https://github.com/libimobiledevice/libplist ) を 64 ビット Windows 用にクロスコンパイルし、そこから DLL を作成しようとしています。Windows 10 (Ubuntu 14.04 bash) の Linux サブシステム用に mingw-w64 をダウンロードし、環境変数 (CC、CXX、CPP、RANLIB) を設定しました。./autogen.sh --host=x86_64-w64-mingw32
パッケージの構成に使用します。ただし、エラーで終了します:
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ライブラリが必要なためだと思いました。Windowsから適切なファイルをコピーし、構成用の環境変数を個別C:/Python27/include
に設定しようとしました。どちらも機能しませんでした。また、スクリプトが Linux にインストールされているものを使用するのはなぜですか? 他のものを強制的に使用する方法はありますか?LDFLAGS="-L/path/to/python/include"
PKG_CONFIG_PATH=/path/to/python/include
C:/Python27/include
pyconfig.h
私の主な目的は、libusbmuxd ( https://github.com/libimobiledevice/libusbmuxd )から 64 ビット Windows DLL を作成することですが、libplist もコンパイルする必要があります。どうすればこの問題を解決できますか? 事前に回答いただきありがとうございます。