Error de compilación para QT 5.2.1; ID no calificado esperado antes de 'eliminar'

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:  
    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.

preguntado el 12 de junio de 14 a las 10:06

Could you please give us the code before and after qxcbxsettings.cpp:46 -

1 Respuestas

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;
     BOOL        delete;

Respondido el 12 de junio de 14 a las 11:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.