After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339739 - gtk/gtkprintoperation-win32.c: 3 compile error
gtk/gtkprintoperation-win32.c: 3 compile error
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-04-25 17:01 UTC by Kazuki Iwamoto
Modified: 2006-06-11 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gtkprintoperation-win32.c (1.46 KB, patch)
2006-04-25 17:10 UTC, Kazuki Iwamoto
none Details | Review
patch for gtkprintoperation-win32.c (Revision 1.11) (1.05 KB, patch)
2006-06-10 16:45 UTC, Kazuki Iwamoto
none Details | Review

Description Kazuki Iwamoto 2006-04-25 17:01:03 UTC
Please describe the problem:
1. IPrintDialogCallback is already declared in CommDlg.h.
2. win32_status is declared at the middle of a block.
3. page_setup is doubly.

Steps to reproduce:
1. compile by old compiler

Actual results:
Following messages are displayed. (Visual C++ 6.0)
gtkprintoperation-win32.c(64) : error C2011: 'IPrintDialogCallback' : 'struct'
type redefinition
        C:\Program Files\Microsoft Platform SDK\Include\CommDlg.h(890) : see
declaration of 'IPrintDialogCallback'
gtkprintoperation-win32.c(65) : error C2011: 'IPrintDialogCallbackVtbl' :
'struct' type redefinition
        C:\Program Files\Microsoft Platform SDK\Include\CommDlg.h(891) : see
declaration of 'IPrintDialogCallbackVtbl'

gtkprintoperation-win32.c(522) : error C2275: 'DWORD' : illegal use of this type
as an expression
        C:\Program Files\Microsoft Platform SDK\Include\WinDef.h(151) : see
declaration of 'DWORD'
gtkprintoperation-win32.c(522) : error C2146: syntax error : missing ';' before
identifier 'win32_status'
gtkprintoperation-win32.c(522) : error C2144: syntax error : '<Unknown>' should
be preceded by '<Unknown>'
gtkprintoperation-win32.c(522) : error C2144: syntax error : '<Unknown>' should
be preceded by '<Unknown>'
gtkprintoperation-win32.c(522) : error C2143: syntax error : missing ';' before
'identifier'
gtkprintoperation-win32.c(522) : error C2065: 'win32_status' : undeclared identifier
gtkprintoperation-win32.c(820) : error C2146: syntax error : missing ')' before
identifier 'printdlgex'
gtkprintoperation-win32.c(820) : error C2144: syntax error : '<Unknown>' should
be preceded by '<Unknown>'
gtkprintoperation-win32.c(820) : error C2144: syntax error : '<Unknown>' should
be preceded by '<Unknown>'
gtkprintoperation-win32.c(820) : error C2143: syntax error : missing ')' before
'identifier'
gtkprintoperation-win32.c(820) : error C2081: 'LPPRINTDLGEXW' : name informal
parameter list illegal
gtkprintoperation-win32.c(820) : error C2061: syntax error : identifier 'printdlgex'
gtkprintoperation-win32.c(820) : error C2059: syntax error : ';'
gtkprintoperation-win32.c(820) : error C2059: syntax error : ')'
gtkprintoperation-win32.c(821) : error C2449: found '{' at file scope (missing
function header?)
gtkprintoperation-win32.c(859) : error C2059: syntax error : '}'
gtkprintoperation-win32.c(1105) : error C2146: syntax error : missing ')' before
identifier 'printdlgex'
gtkprintoperation-win32.c(1105) : error C2144: syntax error : '<Unknown>' should
be preceded by '<Unknown>'
gtkprintoperation-win32.c(1105) : error C2144: syntax error : '<Unknown>' should
be preceded by '<Unknown>'
gtkprintoperation-win32.c(1105) : error C2143: syntax error : missing ')' before
'identifier'
gtkprintoperation-win32.c(1105) : error C2081: 'LPPRINTDLGEXW' : name in formal
parameter list illegal
gtkprintoperation-win32.c(1105) : error C2061: syntax error : identifier
'printdlgex'
gtkprintoperation-win32.c(1105) : error C2059: syntax error : ';'
gtkprintoperation-win32.c(1105) : error C2059: syntax error : ')'
gtkprintoperation-win32.c(1106) : error C2449: found '{' at file scope (missing
function header?)
gtkprintoperation-win32.c(1155) : error C2059: syntax error : '}'
gtkprintoperation-win32.c(1167) : error C2065: 'callback' : undeclared identifier
gtkprintoperation-win32.c(1167) : error C2059: syntax error : ')'
gtkprintoperation-win32.c(1168) : error C2223: left of '->ref_count' must point
to struct/union
gtkprintoperation-win32.c(1168) : error C4033: 'iprintdialogcallback_addref'
must return a value
gtkprintoperation-win32.c(1171) : error C2143: syntax error : missing '{' before
'__stdcall'
gtkprintoperation-win32.c(1174) : error C2059: syntax error : ')'
gtkprintoperation-win32.c(1175) : error C2143: syntax error : missing ';' before
'type'
gtkprintoperation-win32.c(1177) : error C2065: 'ref_count' : undeclared identifier
gtkprintoperation-win32.c(1222) : error C2059: syntax error : ')'
gtkprintoperation-win32.c(1224) : error C2223: left of '->set_hwnd' must point
to struct/union
gtkprintoperation-win32.c(1227) : error C2223: left of '->set_hwnd' must point
to struct/union
gtkprintoperation-win32.c(1243) : error C2061: syntax error : identifier 'ipdc_vtbl'
gtkprintoperation-win32.c(1243) : error C2059: syntax error : ';'
gtkprintoperation-win32.c(1243) : error C2513: '/*global*/ ' : no variable
declared before '='
gtkprintoperation-win32.c(1257) : error C2059: syntax error : ')'
gtkprintoperation-win32.c(1258) : error C2223: left of '->iPrintDialogCallback'
must point to struct/union
gtkprintoperation-win32.c(1258) : error C2065: 'ipdc_vtbl' : undeclaredidentifier
gtkprintoperation-win32.c(1259) : error C2223: left of '->ref_count' must point
to struct/union
gtkprintoperation-win32.c(1260) : error C2223: left of '->set_hwnd' must point
to struct/union
gtkprintoperation-win32.c(1262) : error C2223: left of '->iPrintDialogCallback'
must point to struct/union
gtkprintoperation-win32.c(1262) : error C4033: 'print_callback_new' must return
a value
gtkprintoperation-win32.c(1266) : error C2061: syntax error : identifier
'_gtk_print_operation_platform_backend_run_dialog'
gtkprintoperation-win32.c(1266) : error C2059: syntax error : ';'
gtkprintoperation-win32.c(1266) : error C2059: syntax error : 'type'
gtkprintoperation-win32.c(1517) : error C4013: 'devmode_from_settings'
undefined; assuming extern returning int
gtkprintoperation-win32.c(1517) : error C4047: '=' : 'HGLOBAL' differs in levels
of indirection from 'int'

gtkprintoperation-win32.c(1621) : error C2082: redefinition of formal parameter
'page_setup'

Expected results:
1. The 2nd declaration in gtkprintoperation-win32.c have to be disable.
2. The declaration have to be moved to top of block.
3. Delete page_setup.

Does this happen every time?


Other information:
Comment 1 Kazuki Iwamoto 2006-04-25 17:10:49 UTC
Created attachment 64283 [details] [review]
patch for gtkprintoperation-win32.c
Comment 2 Kazuki Iwamoto 2006-06-10 16:45:04 UTC
Created attachment 67085 [details] [review]
patch for gtkprintoperation-win32.c (Revision 1.11)

Following messages are displayed. (Visual C++ 2005)
gtkprintoperation-win32.c(75) : error C2011: 'IPrintDialogCallback' : 'struct' type redefinition
        C:\Program Files\Microsoft Platform SDK\include\commdlg.h(890) : see declaration of 'IPrintDialogCallback'
gtkprintoperation-win32.c(76) : error C2011: 'IPrintDialogCallbackVtbl' : 'struct' type redefinition
        C:\Program Files\Microsoft Platform SDK\include\commdlg.h(891) : see declaration of 'IPrintDialogCallbackVtbl'
gtk\gtk\gtkprintoperation-win32.c(540) : error C2275: 'DWORD' : illegal use of this type as an expression
        C:\Program Files\Microsoft Platform SDK\include\windef.h(151) : see declaration of 'DWORD'
gtkprintoperation-win32.c(540) : error C2146: syntax error : missing ';' before identifier 'win32_status'
gtkprintoperation-win32.c(540) : error C2065: 'win32_status' : undeclared identifier
gtkprintoperation-win32.c(1723) : error C4013: 'close' undefined; assuming extern returning int
Comment 3 Tor Lillqvist 2006-06-11 20:00:28 UTC
Thanks. Patch applied.