[wx-dev] #9727: x64 compilation error, wxWidgets won't build

wxTrac noreply at wxsite.net
Mon Jul 14 01:57:16 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9727>

#9727: x64 compilation error, wxWidgets won't build
------------------------------+---------------------------------------------
 Reporter:  hajokirchhoff     |       Owner:         
     Type:  build error       |      Status:  new    
 Priority:  critical          |   Milestone:         
Component:  wxMSW             |     Version:  2.9-svn
 Keywords:  x64 build thread  |   Blockedby:         
    Patch:  0                 |    Blocking:         
------------------------------+---------------------------------------------
 wx-svn, wxMSW, Visual Studio 2005 x64

 wxThread::ExitCode is a void*

 _beginthreadex and CreateThread expect an 'unsigned' as the return code of
 the thread start function.

 On x32 systems, sizeof(void*) == sizeof(unsigned), but on x64 this is no
 longer the case.

 This causes several warning "pointer truncation" and a compiler error
 'cannot convert argument...' in msw/thread.cpp:633.
 _beginthreadex in argument #3 expects a pointer to a function that returns
 'unsigned'. With the original typedef, wxThreadInternal::WinThreadStart
 returns void* which is of different size.

 As a result, wx-svn does not compile.

 The patch changes wxThread::ExitCode from void* to unsigned.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9727>


More information about the wx-dev mailing list