Using wxWidgets with Cygwin/Mingw32 |
Mingw32, or minimalist Gnu-Win32 (the old name for Cygwin), is a variant of Cygwin without the need for the cygwin.dll overhead and with a smaller distribution footprint.
This page describes how to get wxWidgets and Cygwin or Mingw32 cooperating.
Other sources of information:
Here are the steps required:
If using Mingw32 2.95 or below with wxWidgets 2.1 or above, you must hand-patch in Mingw32-gcc295.patches (in the top-level of the wxWidgets 2 installation). Mingw32 2.95.2 and above does not need patching.
> cd c:\wx\src\msw > make -f makefile.g95 > cd c:\wx\samples\minimal > make -f makefile.g95
Gotchas:
For instructions on using earlier versions of wxWidgets and Cygwin, please see the old Cygwin page.
Date: Thu, 16 Mar 2000 08:42:18 -0600 (CST) From: Mumit KhanTo: Mingw32 discussion list at eGroups Mailing-List: contact mingw32-owner@egroups.com Reply-To: mingw32@egroups.com Subject: [mingw] [ANN] libstdc++.a for COM/OLE/-fvtable thunks COM/OLE etc code needs to be compiled with -fvtable-thunks, and that causes problems with the supplied C++ runtime library if you're deriving from any one of the standard classes supplied. I've uploaded libstdc++.a compiled with -fvtable-thunks that you can link with for COM code. Both CRTDLL and MSVCRT versions are on the ftp site: ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2/libstdc++vthunk/ Unzip the appropriate distribution somewhere, say c:/gcc-2.95.2/COM, and use -I and -L flags: $ c++ -fvtable-thunks -Ic:/gcc-2.95.2/COM/include foo.c $ c++ -fvtable-thunks -Lc:/gcc-2.95.2/COM/lib -o foo foo.o Regards, Mumit
Date: Mon, 08 Nov 1999 21:44:47 +0200 From: alexander smishlajevTo: wxwin-developers@wx.dent.med.uni-muenchen.de Subject: wxWidgets compilation problems (win32, gcc 2.95) Reply-To: wxwin-developers@wx.dent.med.uni-muenchen.de hello! i am trying to compile today's snapshot of wxWidgets using cygwin32 (gcc 2.95) in mingw32 build mode. the following things caused problems for me: - include/wx/msw/setup0.h defines wxUSE_NORLANDER_HEADERS. i do not know what they are and probably do not have any. (if wxUSE_NORLANDER_HEADERS is defined, _stdcall is used for CASTWNDPROC, and i did not found _stdcall anywhere in my headers.) - CASTWNDPROC should be defined as WNDPROC in include/wx/msw/private.h - wxFONTENUMPROC should be defined as FONTENUMEXPROC in src/msw/fontenum.cpp - undefined BFFM_* constants in src/msw/dirdlg.cpp - ${ADVANCEDOBJS} should not be added to ${OBJECTS} in src/msw/makefile.g95 having said that, i found the Win32 API library by Anders Norlander at http: will do the trick (at least missing things are defined there), but i cannot test it today. best wishes, alex.
I've received several requests like this one; the best starting point (at least to my knowledge) is Mummit Khan's web page:
www.xraylith.wisc.edu/~khan/software/gnu-win32/
You'll find a host of links to various gnuwin32/mingw32 resources.
At:
www.xraylith.wisc.edu/~khan/software/gnu-win32/mingw-cross-howto.txt
you'll find instructions on building agcs as a cross-compiler from an UNIX system (usually Linux) for mingw32. I follow these instructions, and all went smoothly; this is rare enough to deserve a mention :-) For building a mingw32 toolset (for generating true Windows applications) look under the heading 'Building CROSS Mingw32 tools'.
There are precompiled binaries for Linux, but I do not remember exactly where. Probably Mummit can help people needing these and not able to build them by themselves. He is always very responsive to questions, but please do not overload him...
See also the technical note Cross-compiling Windows applications on Linux.