PythonQt.cpp:1932:42: fatal error: private/qmetaobjectbuilder_p.h: Aucun fichier ou dossier de ce type
#include <private qmetaobjectbuilder_p.h="">
^
compilation terminated.
Makefile:368 : la recette pour la cible « PythonQt.o » a échouée
make[1]: [PythonQt.o] Erreur 1
make[1] : on quitte le répertoire « /usr/local/PythonQt3.1/src »
Makefile:79 : la recette pour la cible « sub-src-make_default-ordered » a échouée
make: [sub-src-make_default-ordered] Erreur 2
What I'm doing wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For certain features (such as the built-in help() function), Python checks whether it’s a tty. When you’re making an embedded console in PythonQt, this didn’t work. The patch below adds this to stdin.
Hi,
I don't have the qmetaobjectbuilder_p.h, so I add the sources with the qt maintenance tool. because you tell me about the private headers for QtCore. thank you :)
The make build the libPythonQt.so and libPythonQt_QtAll.so and stop again.
don't find :
PyUnicodeUCS2_decodeUTF16 and PyUnicodeUCS2_AsUTF8String :(
thank you for your help .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I don't have the qmetaobjectbuilder_p.h, so I add the sources with the qt maintenance tool. because you tell me about the private headers for QtCore. thank you :)
The make build the libPythonQt.so and libPythonQt_QtAll.so and stop again.
don't find :
PyUnicodeUCS2_decodeUTF16 and PyUnicodeUCS2_AsUTF8String :(
during the make step I obtain this error :
"
In file included from /usr/local/include/python2.7/Python.h:87:0,
from PythonQtPythonInclude.h:59,
from PythonQtStdIn.h:46,
from PythonQtStdIn.cpp:42:
/usr/local/include/python2.7/boolobject.h:24:46: error: could not convert ‘(((void)(((PyObject)(& _Py_TrueStruct))->_object::ob_refcnt ++)), ((PyObject)(& _Py_TrueStruct)))’ from ‘PyObject {aka _object}’ to ‘PyObject {aka _object}’
#define Py_True ((PyObject *) &_Py_TrueStruct)
best regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
On my system I have :
python 2.7.12 & QT5.7
python.prf is : 2.7.
during the building of PythonQt I obtain :
PythonQt.cpp:1932:42: fatal error: private/qmetaobjectbuilder_p.h: Aucun fichier ou dossier de ce type
#include <private qmetaobjectbuilder_p.h="">
^
compilation terminated.
Makefile:368 : la recette pour la cible « PythonQt.o » a échouée
make[1]: [PythonQt.o] Erreur 1
make[1] : on quitte le répertoire « /usr/local/PythonQt3.1/src »
Makefile:79 : la recette pour la cible « sub-src-make_default-ordered » a échouée
make: [sub-src-make_default-ordered] Erreur 2
What I'm doing wrong?
You are missing core-private, the private headers for QtCore.
Maybe you did not compile/install Qt completely?
Hello,
For certain features (such as the built-in help() function), Python checks whether it’s a tty. When you’re making an embedded console in PythonQt, this didn’t work. The patch below adds this to stdin.
Kind regards,
Sander Stoks
Index: PythonQtStdIn.cpp
--- PythonQtStdIn.cpp (revision 441)
+++ PythonQtStdIn.cpp (working copy)
@@ -61,10 +61,17 @@
return Py_BuildValue("s", string.toLatin1().constData());
}
+static PyObject PythonQtStdInRedirect_isatty(PyObject * /self/)
+{
+ Py_RETURN_TRUE;
+}
+
static PyMethodDef PythonQtStdInRedirect_methods[] = {
{"readline", (PyCFunction)PythonQtStdInRedirect_readline, METH_VARARGS,
"read input line"},
- {NULL, NULL, 0 , NULL} / sentinel /
+ {"isatty", (PyCFunction)PythonQtStdInRedirect_isatty, METH_NOARGS,
+ "is this a tty"},
+ {NULL, NULL, 0 , NULL} / sentinel */
};
static PyMemberDef PythonQtStdInRedirect_members[] = {
Hi,
I don't have the qmetaobjectbuilder_p.h, so I add the sources with the qt maintenance tool. because you tell me about the private headers for QtCore. thank you :)
The make build the libPythonQt.so and libPythonQt_QtAll.so and stop again.
don't find :
PyUnicodeUCS2_decodeUTF16 and PyUnicodeUCS2_AsUTF8String :(
thank you for your help .
Hi,
For future readers: if you were using apt-get to install Qt in your system, you can get this header by doing
sudo apt-get install qtbase5-private-dev
Regards,
Sander
Ok i will try that..
thanks you
Both windows or linux make have a problem with PythonQTdecorators...
Thank you for your answer.
I change the original PythonQtStdln.cpp for that :
during the make step I obtain this error :
"
In file included from /usr/local/include/python2.7/Python.h:87:0,
from PythonQtPythonInclude.h:59,
from PythonQtStdIn.h:46,
from PythonQtStdIn.cpp:42:
/usr/local/include/python2.7/boolobject.h:24:46: error: could not convert ‘(((void)(((PyObject)(& _Py_TrueStruct))->_object::ob_refcnt ++)), ((PyObject)(& _Py_TrueStruct)))’ from ‘PyObject {aka _object}’ to ‘PyObject {aka _object}’
#define Py_True ((PyObject *) &_Py_TrueStruct)
best regards,
Hello,
My apologies - my patch was for an unrelated issue, not related to Linux compilation. I thought I was posting a new topic.
Regards,
Sander Stoks