Opened 6 years ago

Closed 6 years ago

#14475 closed build error (fixed)

Revision 72020 won't build with MinGW: evtloopconsole.cpp issues

Reported by: PB Owned by:
Priority: normal Milestone:
Component: build Version: stable-latest
Keywords: Cc: pbfordev@…
Blocked By: Blocking:
Patch: no

Description

Attempting to build current SVN (r72020) with MinGW (GCC 4.6.1) using

mingw32-make -f makefile.gcc UNICODE=1 BUILD=debug

leads to following (probably 72008 related) errors

../../src/msw/evtloopconsole.cpp: In member function 'virtual bool wxMSWEventLoo
pBase::Pending() const':
../../src/msw/evtloopconsole.cpp:49:5: error: 'MSG' was not declared in this sco
pe
../../src/msw/evtloopconsole.cpp:49:9: error: expected ';' before 'msg'
../../src/msw/evtloopconsole.cpp:50:12: error: '::PeekMessage' has not been decl
ared
../../src/msw/evtloopconsole.cpp:50:27: error: 'msg' was not declared in this sc
ope
../../src/msw/evtloopconsole.cpp:50:41: error: 'PM_NOREMOVE' was not declared in
this scope
../../src/msw/evtloopconsole.cpp: In member function 'bool wxMSWEventLoopBase::G
etNextMessage(WXMSG*)':
../../src/msw/evtloopconsole.cpp:55:11: error: 'BOOL' does not name a type
../../src/msw/evtloopconsole.cpp:57:10: error: 'rc' was not declared in this sco
pe
../../src/msw/evtloopconsole.cpp:63:10: error: 'rc' was not declared in this sco
pe
../../src/msw/evtloopconsole.cpp:66:41: error: 'wxLogLastError' was not declared
in this scope
../../src/msw/evtloopconsole.cpp: At global scope:
../../src/msw/evtloopconsole.cpp:53:6: warning: unused parameter 'msg' [-Wunused
-parameter]
../../src/msw/evtloopconsole.cpp: In member function 'int wxMSWEventLoopBase::Ge
tNextMessageTimeout(WXMSG*, long unsigned int)':
../../src/msw/evtloopconsole.cpp:83:11: error: '::PeekMessage' has not been decl
ared
../../src/msw/evtloopconsole.cpp:83:39: error: 'PM_REMOVE' was not declared in t
his scope
../../src/msw/evtloopconsole.cpp:87:9: error: 'DWORD' was not declared in this s
cope
../../src/msw/evtloopconsole.cpp:87:15: error: expected ';' before 'rc'
../../src/msw/evtloopconsole.cpp:95:18: error: 'rc' was not declared in this sco
pe
../../src/msw/evtloopconsole.cpp:99:43: error: 'wxLogDebug' was not declared in
this scope
../../src/msw/evtloopconsole.cpp:102:18: error: 'WAIT_TIMEOUT' was not declared
in this scope
../../src/msw/evtloopconsole.cpp:105:18: error: 'WAIT_OBJECT_0' was not declared
in this scope
../../src/msw/evtloopconsole.cpp:106:23: error: '::PeekMessage' has not been dec
lared
../../src/msw/evtloopconsole.cpp:117:15: error: invalid use of incomplete type '
WXMSG {aka struct tagMSG}'
..\..\include/wx/defs.h:3034:16: error: forward declaration of 'WXMSG {aka struc
t tagMSG}'
../../src/msw/evtloopconsole.cpp:117:28: error: 'WM_QUIT' was not declared in th
is scope
../../src/msw/evtloopconsole.cpp: At global scope:
../../src/msw/evtloopconsole.cpp:75:5: warning: unused parameter 'timeout' [-Wun
used-parameter]
../../src/msw/evtloopconsole.cpp: In member function 'virtual void wxConsoleEven
tLoop::ProcessMessage(WXMSG*)':
../../src/msw/evtloopconsole.cpp:135:5: error: '::DispatchMessage' has not been
declared
../../src/msw/evtloopconsole.cpp: In member function 'virtual bool wxConsoleEven
tLoop::Dispatch()':
../../src/msw/evtloopconsole.cpp:140:5: error: 'MSG' was not declared in this sc
ope
../../src/msw/evtloopconsole.cpp:140:9: error: expected ';' before 'msg'
../../src/msw/evtloopconsole.cpp:141:27: error: 'msg' was not declared in this s
cope
../../src/msw/evtloopconsole.cpp:144:21: error: 'msg' was not declared in this s
cope
../../src/msw/evtloopconsole.cpp: In member function 'virtual int wxConsoleEvent
Loop::DispatchTimeout(long unsigned int)':
../../src/msw/evtloopconsole.cpp:151:5: error: 'MSG' was not declared in this sc
ope
../../src/msw/evtloopconsole.cpp:151:9: error: expected ';' before 'msg'
../../src/msw/evtloopconsole.cpp:152:37: error: 'msg' was not declared in this s
cope
../../src/msw/evtloopconsole.cpp: In member function 'int wxMSWEventLoopBase::Ge
tNextMessageTimeout(WXMSG*, long unsigned int)':
../../src/msw/evtloopconsole.cpp:118:1: warning: control reaches end of non-void
function [-Wreturn-type]
../../src/msw/evtloopconsole.cpp: In member function 'virtual bool wxMSWEventLoo
pBase::Pending() const':
../../src/msw/evtloopconsole.cpp:51:1: warning: control reaches end of non-void
function [-Wreturn-type]
mingw32-make: * [gcc_mswud\baselib_evtloopconsole.o] Error 1

Analogical build with MSVC 2008 Express using makefile.vc works just fine.

Change History (5)

comment:1 Changed 6 years ago by vadz

I think it's just a missing header, although I wonder why does it work for me (when cross-compiling using MinGW from Linux). Anyhow, please reopen if it's still broken after the upcoming commit.

comment:2 Changed 6 years ago by vadz

  • Status changed from new to confirmed

Ah, sorry, I do know. It's the PCH issue again, I can reproduce the problem if I turn PCH off, of course.

comment:3 Changed 6 years ago by PB

Sorry for the off-topic, but am I doing something wrong that precompiled headers are not used when I build wxWidgets with MinGW (they apparently are used with MSVC) using the procedure described in the first post?

comment:4 Changed 6 years ago by vadz

makefiles don't support PCH, you need to use MSYS/configure to use them with MinGW.

comment:5 Changed 6 years ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [72025]) Fix compilation of newly added msw/evtloopconsole.cpp without PCH.

Include <windows.h> and "wx/log.h" explicitly when not using PCH.

Closes #14475.

Note: See TracTickets for help on using tickets.