Search code examples
c++mingwwxwidgetsmingw32

Unable to build wxMSW-2.8.12 using MinGW


I have tried two different versions of gcc (4.6 and 4.7) with several configurations including

make -f makefile.gcc USE_OPENGL=1 BUILD=debug SHARED=0 RUNTIME_LIBS=static UNICODE=1
make -f makefile.gcc MONOLITHIC=1 BUILD=debug SHARED=0 UNICODE=1
make -f makefile.gcc USE_OPENGL=1 BUILD=debug UNICODE=1

This is the error

../../src/msw/thread.cpp:525: error: cast from 'void*' to 'THREAD_RETVAL' loses precision
../../src/msw/thread.cpp: In member function 'wxThreadError wxThreadInternal::WaitForTerminate(wxCriticalSection&, void**, wxThread*)':
../../src/msw/thread.cpp:845: error: cast from 'void*' to 'DWORD' loses precision
../../src/msw/thread.cpp: In member function 'void wxThread::Exit(void*)':
../../src/msw/thread.cpp:1165: error: cast from 'void*' to 'unsigned int' loses precision

My platform is Windows 7 64-bit but am not trying to build a 64-bit library ( not intentionally anyway)
What am I doing wrong?


Solution

  • The error happens when trying to build wxWidgets using MinGW-w64. In my case the source of my troubles was that I had Strawberry Perl 5.14.2.1 (64bit) installed and wasn't aware that perl had installed a gcc compiler which was in the path.