2016-07-03 25 views
3

Ich habe eine cross gdb mit Python-Unterstützung unter Windows mit MSYS2/MINGW64 erstellt. Ich habe Python in MINGW64 installiert, d. H. Ich habe python2.7.exe in C:\msys64\mingw64\bin und diese Adresse ist in meinem Pfad.Cross gdb kann Python nicht finden

ich die folgenden Fehler, wenn ich gdb laufen

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` 

Ich habe auch C:\msys64\mingw64\lib, wo ich die libpython2.7.dll.a haben, aber ich immer noch die gleichen Fehler.

Ich habe auch versucht, Python auf Windows installieren und richten Sie alle Pfade, aber immer noch den gleichen Fehler.

Wie kann ich gdb Python finden?

Antwort

0

Sie haben Umgebungsvariablen setzen:

PYTHONPATH = C: \ msys64 \ mingw64 \ lib \ python2.7; C: \ msys64 \ mingw64 \ lib \ python2.7 \ lib-dynload;

PYTHON Variable bezieht sich auf Python-Interpreter:

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

ich meine eigene GDB unter msys2 gebaut und es funktioniert nach dem richtigen Umgebungsvariablen:

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) 

für configure Meine Kommandozeile lautete:

./configure --target=x86_64-linux-gnu --prefix=/home/tiit/gdb-7.11-bin --with-python=/mingw64/bin/python.exe --enable-static=yes