GNOME Bugzilla – Bug 683696
cc-printers-panel.c fails to compile; error: redefinition of typedef ‘UserResponseCallback’
Last modified: 2012-09-10 13:56:10 UTC
This is with gcc-4.5 and gnome-control-center trunk. In file included from cc-printers-panel.c:37:0: pp-options-dialog.h:31:16: error: redefinition of typedef ‘UserResponseCallback’ pp-ppd-selection-dialog.h:32:16: note: previous declaration of ‘UserResponseCallback’ was here In file included from cc-printers-panel.c:38:0: pp-jobs-dialog.h:31:16: error: redefinition of typedef ‘UserResponseCallback’ pp-options-dialog.h:31:16: note: previous declaration of ‘UserResponseCallback’ was here make[3]: *** [cc-printers-panel.lo] Error 1 I believe that with gcc-4.6, re-declaration of identical typedefs is not an error. But with earlier versions of gcc, it is. The following headers declare `UserResponseCallback`: panels/printers/pp-ppd-selection-dialog.h panels/printers/pp-options-dialog.h panels/printers/pp-jobs-dialog.h What I thought of was to separate out the declaration into another header file and then include that in these headers, but I'm not sure to create another file, reuse another file, or even whether this is a good idea.
commit 0a0bc59afacc08fe0ec6378a7171eb3fdb549fe3 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Sep 10 14:55:04 2012 +0100 printers: Avoid redefinition of UserResponseCallback It was declared to be the same value in all three headers, which causes problems with old version of GCC. https://bugzilla.gnome.org/show_bug.cgi?id=683696