1

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/includeC:/Python27/includepyconfig.h

私の主な目的は、libusbmuxd ( https://github.com/libimobiledevice/libusbmuxd )から 64 ビット Windows DLL を作成することですが、libplist もコンパイルする必要があります。どうすればこの問題を解決できますか? 事前に回答いただきありがとうございます。

4

1 に答える 1

0

libimobiledevice-win32 を試すことができます。名前は少しわかりにくいですが、libimobiledevice の 32 ビットおよび 64 ビット Windows バージョンをビルドします。

libplist、libusbmuxd、libimobildevice、および Visual Studio を使用して Windows 用のさまざまなユーティリティをコンパイルできるため、クロス コンパイルの必要がありません。

私が勤務している会社である Quamotion は、libimobiledevice-win32 を保守しており、アップストリームの最新の変更に遅れないように努めています。

CI ビルドからコンパイル済みのバージョンをダウンロードできます。たとえば、最新のビットを含む zip ファイルについては、https ://ci.appveyor.com/project/qmfrederik/imobiledevice-net/build/artifacts を参照してください。

于 2018-01-16T11:10:51.007 に答える