2016-07-03 11 views
3

MSYS2/MINGW64を使用してWindows上でPythonをサポートするクロスgdbを構築しました。私はMINGW64にpythonをインストールしました。つまりpython2.7.exeC:\msys64\mingw64\binにあり、このアドレスは私のパスにあります。クロスgdbはPythonを見つけることができません

私はgdbの

Could not find platform independent libraries <prefix> 
Could not find platform dependent libraries <exec_prefix> 
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 
ImportError: No module named site` 

を実行したときに、私は次のエラーを取得する私はlibpython2.7.dll.aを持ってどこにもC:\msys64\mingw64\libを追加しましたが、私はまだ同じエラーを取得します。

私はまた、Windowsにpythonをインストールして、すべてのパスを設定しようとしましたが、同じエラーです。

gdbでpythonを見つける方法を教えてください。

答えて

0

あなたは環境変数を設定する必要があります。

PYTHONPATH = C:\ msys64 \にMinGW64 \ libに\ python2.7; C:\ msys64 \にMinGW64 \ libに\ python2.7 \ libに-dynloadを。

PYTHONHOME変数は、Pythonインタプリタを参照:

PYTHONHOME=C:\msys64\mingw64\bin\pyhon.exe 

私はmsys2の下に自分のgdbを構築し、それが正しい環境変数を設定した後に動作します:構成するための

Microsoft Windows [Version 10.0.16299.19] 
(c) 2017 Microsoft Corporation. All rights reserved. 

C:\Users\tiit>echo %PYTHONHOME% 
C:\msys64\mingw64\bin\pyhon.exe 

C:\Users\tiit>echo %PYTHONPATH% 
C:\msys64\mingw64\lib\python2.7;C:\msys64\mingw64\lib\python2.7\lib-dynload; 

C:\Users\tiit>C:\msys64\home\tiit\gdb-7.11-bin\bin\x86_64-linux-gnu-gdb.exe 
GNU gdb (GDB) 7.11.1.20160801-git 
Copyright (C) 2016 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. Type "show copying" 
and "show warranty" for details. 
This GDB was configured as "--host=x86_64-w64-mingw32 --target=x86_64-linux-gnu". 
Type "show configuration" for configuration details. 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>. 
Find the GDB manual and other documentation resources online at: 
<http://www.gnu.org/software/gdb/documentation/>. 
For help, type "help". 
Type "apropos word" to search for commands related to "word". 
(gdb) 

私のコマンドラインは:

./configure --target=x86_64-linux-gnu --prefix=/home/tiit/gdb-7.11-bin --with-python=/mingw64/bin/python.exe --enable-static=yes 
関連する問題