Error de compilación para QT 5.2.1; ID no calificado esperado antes de 'eliminar'
Frecuentes
Visto 1,022 equipos
2
Estoy tratando de compilar QT 5.2.1
for an older Linux distro (Suse Linux Enterprise 11) and after a while I receive the error below:
In file included from qxcbxsettings.cpp:46:0:
/usr/include/X11/extensions/XIproto.h:1825:17:
error: expected unqualified-id before 'delete'
BOOL delete;
I'm more or less confident this is caused by the fact that "delete" is a reserved word for C++. If this header would be my own, I would simply rename delete to something else, but of course it is not an option in case of an X11 header file.
Any ideas how can I force gcc
to compile as plain C for this header? All I found is a configure option -no-c++11
for qt's configure script, but that did not make a difference.
1 Respuestas
0
delete is a reserved keyword in C++, There is bug reported related to X11/extensions/XIproto.h file aquí
Ellos también proporcionaron parche por lo mismo
So you need to apply patch for compiling further patch is like
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_delete;
+#else
BOOL delete;
+#endif
Respondido el 12 de junio de 14 a las 11:06
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas c++ linux gcc qt5 or haz tu propia pregunta.
Could you please give us the code before and after
qxcbxsettings.cpp:46
- Thomas Ayoub