+1. CodeWarrior Pro7 project files in XML format are already
+ included in wxMSW-2.5.0.zip and the setup version.
+2. Review the file include\wx\msw\setup.h (or include\wx\msw\setup0.h if
+ you are working from the CVS version) to make sure the settings reflect
+ what you want. If you aren't sure, leave it alone and go with the
+ default settings. A few notes:
+ - Don't use wxUSE_DEBUG_NEW_ALWAYS: it doesn't mix well with MSL
+ - wxUSE_GLOBAL_MEMORY_OPERATORS works, but memory leak reports
+ will be rather confusing due to interactions with the MSL ANSI
+ and runtime libs.
+3. The project file to build the Win32 wxWindows libraries relies on the
+ Batch File Runner plug-in. This plug-in is not installed as part of
+ a normal CW7 installation. However, you can find this plug-in on the
+ CodeWarrior Reference CD, in the Thrill Seekers folder; it's call the
+ "Batch File Post Linker".
+4. If you choose not to install the Batch File Runner plug-in, then you
+ need to do the following by hand:
+ (1) Create the directories lib\cw7msw\include\wx and copy the file
+ include\wx\msw\setup.h (or include\wx\msw\setup0.h if you are
+ working from the CVS version) to lib\cw7msw\include\wx\setup.h
+ (2) Create the directories lib\cw7mswd\include\wx and copy the file
+ include\wx\msw\setup.h (or include\wx\msw\setup0.h if you are
+ working from the CVS version) to lib\cw7mswd\include\wx\setup.h
+5. Import src\wxWindowsW7.xml to create the project file wxWindowsW7.mcp.
+ Store this project file in directory src. You may get warnings about
+ not being able to find certain project paths; ignore these warnings, the
+ appropriate paths will be created during the build by the Batch File Runner.
+6. Choose the wxlib Win32 debug or wxlib Win32 Release target and build. You
+ will get some warnings about hidden virtual functions, illegal conversions
+ from const pointers to pointers, etc., all of which you can safely ignore.
+ ***Note: if you get errors that the compiler can't find "wx/setup.h", just
+ stop the build and build again. These errors occur because sometimes the
+ compiler starts doing its thing before the copying of setup.h has completed.
+7. The following libraries will be produced depending on chosen
+ target:
+ - wx_x86.lib ANSI Release (static)
+ - wx_x86_d.lib ANSI Debug (static)
+8. Sorry, I haven't had time yet to create and test unicode or DLL versions.
+ Volunteers for this are welcome (as neither DLLs nor unicode builds are
+ big priorities for me ;).
+9. CodeWarrior Pro7 project files (in XML format) are also provided for some
+ of the samples. In particular, there are project files for the minimal,
+ controls, dialogs, dnd, nd docview samples. You can use these project
+ files as templates for the other samples and for your own projects.
+ - For example, to make a project file for the "newgrid" sample,
+ just copy the project file for the "minimal" sample, minimalW7.mcp
+ (made by importing minimalW7.xml into CodeWarrior), into the
+ sample/newgrid directory, calling it newgridW7.mcp. Open
+ newgridW7.mcp and revise the project by deleting the files
+ minimal.rc and minimal.cpp and adding the files griddemo.rc and
+ griddemo.cpp. Build and run....
+
+Cygwin/Mingw32 compilation
+----------------------------------
+
+wxWindows 2 supports Cygwin (formerly GnuWin32) betas and
+releases, and Mingw32. Cygwin can be downloaded from:
+
+ http://sources.redhat.com/cygwin
+
+and Mingw32 from:
+
+ http://www.mingw.org
+
+Both Cygwin and MinGW can be used with the same makefiles.
+
+NOTE: some notes specific to old Cygwin ( < 1.1.x )
+ and MinGW ( < 1.0 ) are at the end of this section
+ ( see OLD VERSIONS )
+
+There are two methods of compiling wxWindows, by using the
+makefiles provided or by using 'configure'.
+
+Retrieve and install the latest version of Cygwin, or Mingw32, as per
+the instructions with either of these packages.
+
+If using Mingw32, you can download the add-on MSYS package to
+provide Unix-like tools that you'll need to build wxWindows.
+
+The solution prior to MSYS was to download extra utilities from
+ports/mingw32 on the wxWindows ftp site or CD-ROM:
+
+ ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip
+
+These should be extracted to a directory in your path. If you have
+already downloaded rm, cp, mv from elsewhere, or are using
+MSYS, you won't need all of these files. However if using MSYS
+and configure to build wxWindows, you will need to unzip the
+following files from extra.zip and place them in e.g. an
+extrabin directory which you then add to your path:
+
+ bison.exe bison.hairy bison.simple flex.exe
+
+You will also need to set these variables:
+
+ set BISON_SIMPLE=c:\apps\mingw2.0.0-3\extrabin\bison.simple
+ set BISON_HAIRY=c:\apps\mingw2.0.0-3\extrabin\bison.hairy
+
+Here we're setting them in DOS before invoking 'sh', but you
+could set them within the shell instead.
+
+The 'configure' method uses flex and bison, whereas the
+direct makefile method uses pregenerated C files.
+
+Using makefiles directly
+========================
+
+NOTE: The makefile are for compilation under Cygwin, MSYS, or
+ command.com/cmd.exe, they won't work in other environments
+ (such as UNIX)
+
+Here are the steps required using the provided makefiles:
+
+- Set your WXWIN variable to where wxWindows is installed.
+ *** IMPORTANT: For Cygwin/Mingw32, use forward slashes in the path, not
+ backslashes.
+
+- Edit src/makeg95.env and set the MINGW32 variable at the top of
+ the file to either 1 (you have Mingw32) or 0 (if you have
+ Cygwin). If using Mingw32, also set the MINGW32VERSION variable
+ appropriately.
+
+- Use the makefile.g95 files for compiling wxWindows and samples,
+ e.g. to compile a debugging version of wxWindows:
+ > cd c:\wx\src\msw
+ > make -f makefile.g95 clean
+ > make -f makefile.g95
+ > cd c:\wx\samples\minimal
+ > make -f makefile.g95 cleanall
+ > make -f makefile.g95
+
+ to compile with optimizations:
+ > cd c:\wx\src\msw
+ > make -f makefile.g95 clean
+ > make -f makefile.g95 FINAL=1
+ > cd c:\wx\samples\minimal
+ > make -f makefile.g95 cleanall
+ > make -f makefile.g95 FINAL=1
+
+ to compile a DLL:
+ > cd c:\wx\src\msw
+ > make -f makefile.g95 clean
+ > make -f makefile.g95 WXMAKINGDLL=1
+ > cd c:\wx\samples\minimal
+ > make -f makefile.g95 cleanall
+ > make -f makefile.g95 WXUSINGDLL=1
+
+ to compile the Unicode version:
+ > cd c:\wx\src\msw
+ > make -f makefile.g95 clean
+ > make -f makefile.g95 UNICODE=1
+ > cd c:\wx\samples\minimal
+ > make -f makefile.g95 cleanall
+ > make -f makefile.g95 UNICODE=1
+
+ Options can be combined ( e.g.: UNICODE=1 FINAL=1 )
+
+ Ignore the warning about the default entry point.
+
+- Use the 'strip' command to reduce executable size.
+
+- With Cygwin, you can invoke gdb --nw myfile.exe to
+ debug an executable. If there are memory leaks, they will be
+ flagged when the program quits. You can use Cygwin gdb
+ to debug MinGW executables.
+
+All targets have 'clean' targets to allow removal of object files
+and other intermediate compiler files and 'cleanall' targets to
+allow removal of all object files and library files.
+
+Using configure
+===============
+
+Instead of using the makefiles, you can use the configure
+system to generate appropriate makefiles, as used on Unix
+and Mac OS X systems.
+
+Change directory to the root of the wxWindows distribution,
+make a build directory, run 'sh', and then from this shell
+run configure and make.
+
+For example:
+
+ cd $WXWIN
+ mkdir build-debug
+ cd build-debug
+ ../configure --with-msw --enable-debug --enable-debug_gdb --disable-shared
+ make
+ cd samples/minimal
+ make
+ ./minimal.exe
+
+Notes:
+
+1. See also the Cygwin/Mingw32 on the web site or CD-ROM for
+ further information about using wxWindows with these compilers.
+
+2. libwx.a is 100 MB or more - but much less if compiled with no
+ debug info (-g0) and level 4 optimization (-O4).
+
+3. If you get a link error under Mingw32 2.95.2 referring to:
+
+ EnumDAdvise__11IDataObjectPP13IEnumSTATDATA@8
+
+ then you need to edit the file objidl.h at line 663 and add
+ a missing PURE keyword:
+
+ STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**) PURE;
+
+4. There's a bug in Mingw32 headers for some early distributions.
+
+ in include/windows32/defines.h, where it says:
+
+ #define LPSTR_TEXTCALLBACKA (LPSTR)-1L)
+
+ it should say:
+
+ #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)
+
+ (a missing bracket).
+
+5. If there's a problem with the copy or remove commands in
+ src/msw/makefile.g95, you may need to change the COPY and
+ RM variables in makeg95.env.
+
+6. If there's a problem executing the windres program, try
+ commenting out RCPREPROCESSOR in makeg95.env.
+
+7. OpenGL support should work with Mingw32 as-is. However,
+ if you wish to generate import libraries appropriate either for
+ the MS OpenGL libraries or the SGI OpenGL libraries, go to
+ include/wx/msw/gl and use:
+
+ dlltool -k -d opengl.def -llibopengl.a
+
+ for the SGI DLLs, or
+
+ dlltool -k -d opengl32.def -llibopengl32.a
+
+ and similarly for glu[32].def.
+
+OLD VERSIONS:
+
+- If using Mingw32 2.95 and below with wxWindows 2.1 or above, you
+ must hand-patch with Mingw32-gcc295.patches (located in the
+ top-level of the wxWindows 2 installation). Mingw32 2.95.2
+ and above contain the fixes already.
+
+- Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat)
+ to set up appropriate variables, if necessary mounting drives.
+ Run it before compiling.
+
+- For Cygwin, make sure there's a \tmp directory on your
+ Windows drive or bison will crash (actually you don't need
+ bison for ordinary wxWindows compilation: a pre-generated .c file is
+ supplied).
+
+- If using GnuWin32 b18, you will need to copy windres.exe
+ from e.g. the Mingw32 distribution, to a directory in your path.