[SailfishDevel] Include Python.h

Benoît HERVIER khertan at khertan.net
Tue Aug 6 08:41:06 UTC 2013


I'm currently facing a problem that i didn't understand :

./qpython.h:4:20: fatal error: Python.h: No such file or directory

#ifndef _QPYTHON_H
#define _QPYTHON_H

#include "Python.h"

I ve installed via zypper python-devel in mersdk vm.

I've even added hardcoded path in .pro:
INCLUDEPATH += /usr/include/python2.7
LIBS += -lpython2.7

And python2.7 headers path are in the gcc cmd:

Exécution_de(%build): /bin/sh -e /var/tmp/rpm-tmp.b27OWP
g++ -c -m32 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Wformat-security -m32 -march=core2 -mssse3 -mtune=atom -mfpmath=sse 
-fasynchronous-unwind-tables -fno-omit-frame-pointer -Wall -W 
-DDEPLOYMENT_PATH="\""/usr/share/ownNotesForSailfish/"\"" -DQT_QML_DEBUG 
-DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-32 -I. 
-I/usr/include/python2.7 -Isailfishapplication -I/usr/include/qt5 
-I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQml 
-I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui 
-I/usr/include/qt5/QtCore -Imoc -o obj/main.o main.cpp

Python.h is available in /usr/include/python2.7 on mersdk vm.

Such include is working in QtProject QtCreator on desktop ... so i 
suppose that something i miss with the compilation on target ...

Any advice ?
Benoît HERVIER - http://khertan.net/

More information about the Devel mailing list