Some small updates to build instructions. Most of the changes are simply

corrections to Cygwin/MinGW capitalisation/names.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-02-04 14:19:25 +00:00
parent b977811c6d
commit f31e566dca
2 changed files with 55 additions and 66 deletions

View File

@@ -19,30 +19,29 @@ varaibles and PATH entries.
Continue with item c) below. Continue with item c) below.
b) If using the GNU Mingw32 or GNU Cygwin32 compilers b) If using the MinGW or Cygwin compilers
You can get Mingw32 from http://www.mingw.org You can get MinGW from http://www.mingw.org/
Cygwin32 is available at http://www.cygwin.com Cygwin is available at http://sources.redhat.com/cygwin/
The makefile might have small problems with Cygwin's tools The makefile might have small problems with Cygwin's tools
so it is recommended to use Mingw32 and its toolchain instead so it is recommended to use MinGW and its toolchain instead
if possible. if possible.
-> Set your path so that it includes the directory -> Set your path so that it includes the directory
where your compiler and tools reside where your compiler and tools reside
-> If your are using an old Mingw32 version (gcc-2.95 or older), -> If your are using an old MinGW version (gcc-2.95 or older),
you might need to fix some headers with the patches contained you might need to fix some headers with the patches contained
in the wxWin\Mingw32-gcc295.patches file. PLEASE APPLY THESE in the wxWin\Mingw32-gcc295.patches file. PLEASE APPLY THESE
PATCHES BY HAND! There are apparently a few different versions PATCHES BY HAND! There are apparently a few different versions
of the headers floating around. Note that these patches are of the headers floating around. Note that these patches are
not needed if you are using Mingw32 gcc-2.95.2 or newer. not needed if you are using MinGW gcc-2.95.2 or newer.
-> Edit wx/src/makeg95.env and set the MINGW32 variable at the top of -> Edit wx/src/makeg95.env and set the MINGW32 variable at the top of
the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). the file to either 1 (you have MinGW) or 0 (you have Cygwin).
If using MINGW32, also set the MINGW32VERSION variable Also set the MINGW32VERSION variable appropiately.
appropiately.
c) Build instructions c) Build instructions
@@ -51,19 +50,8 @@ c) Build instructions
into c:\wxWin into c:\wxWin
-> Copy c:\wxWin\include\wx\msw\setup0.h -> Copy c:\wxWin\include\wx\msw\setup0.h
to c:\wxWin\include\wx\msw\setup.h to c:\wxWin\include\wx\msw\setup.h
-> Edit c:\wxWin\include\wx\msw\setup.h so that -> Edit c:\wxWin\include\wx\msw\setup.h to choose
most features are enabled (i.e. defined to 1), for example: the features you would like to compile wxWindows with[out].
#define wxUSE_ODBC 0
#define wxUSE_SOCKETS 1
#define wxUSE_HTML 1
#define wxUSE_THREADS 1
#define wxUSE_FS_INET 0
#define wxUSE_FS_ZIP 1
#define wxUSE_BUSYINFO 1
#define wxUSE_DYNLIB_CLASS 1
#define wxUSE_ZIPSTREAM 1
#define wxUSE_LIBJPEG 1
#define wxUSE_LIBPNG 1
and std iostreams are disabled with and std iostreams are disabled with
#define wxUSE_STD_IOSTREAM 0 #define wxUSE_STD_IOSTREAM 0
@@ -72,6 +60,8 @@ c) Build instructions
-> type: make -f makefile.g95 (if using GNU tools) -> type: make -f makefile.g95 (if using GNU tools)
or type: nmake -f makefile.vc (if using MS VC++) or type: nmake -f makefile.vc (if using MS VC++)
See also docs/msw/install.txt for additional compilation options.
d) Borland (including free command line tools) d) Borland (including free command line tools)
Download tools from http://www.borland.com/downloads/ Download tools from http://www.borland.com/downloads/
@@ -117,11 +107,10 @@ yet complete).
III) Windows using configure III) Windows using configure
---------------------------------------- ----------------------------------------
Take a look at Unix->Windows cross compiling. With minor wxWindows can be built on Windows using MSYS (see
modifications, this should work in Windows if you've got the cygnus http://www.mingw.org/), which is a POSIX build environment
utilities (bash, GNU make, etc) and either mingw32 or cygwin32 installed. for Windows. With MSYS you can just ./configure && make (see also VII,
See http://www.cygnus.com for these programs, or go straight to their Unix->Windows cross-compiling using configure).
ftp server at ftp://sourceware.cygnus.com/pub/cygwin/.
Of course, you can also build the library using plain makefiles (see Of course, you can also build the library using plain makefiles (see
section I). section I).
@@ -168,17 +157,17 @@ VI) OS/2
VII) Unix->Windows cross-compiling using configure VII) Unix->Windows cross-compiling using configure
-------------------------------------------------- --------------------------------------------------
First you'll need a cross-compiler; linux glibc binaries of mingw32 and First you'll need a cross-compiler; linux glibc binaries of MinGW and
cygwin32 (both based on egcs) can be found at Cygwin (both based on egcs) can be found at
ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Alternative binaries, ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Alternative binaries,
based on the latest MinGW release can be found at based on the latest MinGW release can be found at
http://members.telering.at/jessich/mingw/mingwcross/mingw_cross.html http://members.telering.at/jessich/mingw/mingwcross/mingw_cross.html
Otherwise you can compile one yourself. Otherwise you can compile one yourself.
[ A Note about cygwin32 and mingw32: the main difference is that cygwin32 [ A Note about Cygwin and MinGW: the main difference is that Cygwin
binaries are always linked against cygwin.dll. This dll encapsulates most binaries are always linked against cygwin.dll. This dll encapsulates most
standard Unix C extensions, which is very handy if you're porting unix standard Unix C extensions, which is very handy if you're porting unix
software to windows. However, wxMSW doesn't need this, so mingw32 is software to windows. However, wxMSW doesn't need this, so MinGW is
preferable if you write portable C(++). ] preferable if you write portable C(++). ]
You might want to build both Unix and Windows binaries in the same source You might want to build both Unix and Windows binaries in the same source
@@ -203,7 +192,7 @@ yourself:
DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \ DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \
../configure --host=i586-mingw32 --with-mingw ../configure --host=i586-mingw32 --with-mingw
(all assuming you're using mingw32) (all assuming you're using MinGW)
By default this will compile a DLL, if you want a static library, By default this will compile a DLL, if you want a static library,
specify --disable-shared. specify --disable-shared.
@@ -215,7 +204,7 @@ will be a compile error :-)
NB: if you are using a very old compiler you risk to get quite a few warnings NB: if you are using a very old compiler you risk to get quite a few warnings
about "ANSI C++ forbids implicit conversion from 'void *'" in all places about "ANSI C++ forbids implicit conversion from 'void *'" in all places
where va_arg macro is used. This is due to a bug in (some versions of) where va_arg macro is used. This is due to a bug in (some versions of)
mingw32 headers which may be corrected by upgrading your compier, MinGW headers which may be corrected by upgrading your compier,
otherwise you might edit the file otherwise you might edit the file
${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h ${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h
@@ -238,7 +227,7 @@ typedef void *__gnuc_va_list;
__gnuc_va_list is char *. __gnuc_va_list is char *.
If this is successful, you end up with a wx23_2.dll/libwx23_2.a in win32/lib If this is successful, you end up with a wx23_2.dll/libwx23_2.a in win32/lib
( or just libwx_msw.a if you opted for a static build ). (or just libwx_msw.a if you opted for a static build).
Now try building the minimal sample: Now try building the minimal sample:
-> cd samples/minimal -> cd samples/minimal

View File

@@ -63,7 +63,7 @@ General installation notes
-------------------------- --------------------------
Alter your WXWIN environment variable to point to the root directory of the Alter your WXWIN environment variable to point to the root directory of the
wxWindows installation. For Cygwin or Mingw32 compilation, make sure WXWIN wxWindows installation. For Cygwin or MinGW compilation, make sure WXWIN
contains only forward slashes. contains only forward slashes.
If installing from the CVS server, copy include/wx/msw/setup0.h to If installing from the CVS server, copy include/wx/msw/setup0.h to
@@ -154,7 +154,7 @@ Makefile notes:
doesn't occur when using project files to build wxWindows. doesn't occur when using project files to build wxWindows.
To build Unicode versions of the libraries, add UNICODE=1 To build Unicode versions of the libraries, add UNICODE=1
to the nmake invocation ( default is UNICODE=0 ). If you want to to the nmake invocation (default is UNICODE=0). If you want to
be able to use Unicode version on Windows9x, you will need be able to use Unicode version on Windows9x, you will need
MSLU (Microsoft Layer for Unicode) runtime DLL and import lib. MSLU (Microsoft Layer for Unicode) runtime DLL and import lib.
The former can be downloaded from Microsoft, the latter is part The former can be downloaded from Microsoft, the latter is part
@@ -172,7 +172,7 @@ Makefile notes:
To build the DLL version using makefiles: To build the DLL version using makefiles:
1. Change directory to wx\src\msw. Type 'nmake -f makefile.vc dll pch' 1. Change directory to wx\src\msw. Type 'nmake -f makefile.vc dll'
to make both a suitable DLL and import library, and to build a to make both a suitable DLL and import library, and to build a
suitable precompiled header file for compiling applications. suitable precompiled header file for compiling applications.
See the previous section for library names. See the previous section for library names.
@@ -468,34 +468,34 @@ Metrowerks CodeWarrior compilation
minimal.rc and minimal.cpp and adding the files griddemo.rc and minimal.rc and minimal.cpp and adding the files griddemo.rc and
griddemo.cpp. Build and run.... griddemo.cpp. Build and run....
Cygwin/Mingw32 compilation Cygwin/MinGW compilation
---------------------------------- ----------------------------------
wxWindows 2 supports Cygwin (formerly GnuWin32) betas and wxWindows 2 supports Cygwin (formerly GnuWin32) betas and
releases, and Mingw32. Cygwin can be downloaded from: releases, and MinGW. Cygwin can be downloaded from:
http://sources.redhat.com/cygwin http://sources.redhat.com/cygwin/
and Mingw32 from: and MinGW from:
http://www.mingw.org http://www.mingw.org/
Both Cygwin and MinGW can be used with the same makefiles. Both Cygwin and MinGW can be used with the same makefiles, and both can be
used with configure.
NOTE: some notes specific to old Cygwin ( < 1.1.x ) NOTE: some notes specific to old Cygwin (< 1.1.x)
and MinGW ( < 1.0 ) are at the end of this section and MinGW (< 1.0) are at the end of this section
( see OLD VERSIONS ) (see OLD VERSIONS)
There are two methods of compiling wxWindows, by using the There are two methods of compiling wxWindows, by using the
makefiles provided or by using 'configure'. makefiles provided or by using 'configure'.
Retrieve and install the latest version of Cygwin, or Mingw32, as per Retrieve and install the latest version of Cygwin, or MinGW, as per
the instructions with either of these packages. the instructions with either of these packages.
If using Mingw32, you can download the add-on MSYS package to If using MinGW, you can download the add-on MSYS package to
provide Unix-like tools that you'll need to build wxWindows. provide Unix-like tools that you'll need to build wxWindows.
If you do not want to use MSYS, then you need to download extra utilities from
The solution prior to MSYS was to download extra utilities from
ports/mingw32 on the wxWindows ftp site or CD-ROM: ports/mingw32 on the wxWindows ftp site or CD-ROM:
ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip
@@ -530,13 +530,13 @@ NOTE: The makefile are for compilation under Cygwin, MSYS, or
Here are the steps required using the provided makefiles: Here are the steps required using the provided makefiles:
- Set your WXWIN variable to where wxWindows is installed. - Set your WXWIN variable to where wxWindows is installed.
*** IMPORTANT: For Cygwin/Mingw32, use forward slashes in the path, not *** IMPORTANT: For Cygwin/MinGW, use forward slashes in the path, not
backslashes. backslashes.
- Edit src/makeg95.env and set the MINGW32 variable at the top of - 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 the file to either 1 (you have MinGW) or 0 (if you have
Cygwin). If using Mingw32, also set the MINGW32VERSION variable Cygwin); also set the MINGW32VERSION variable appropriately for your
appropriately. GCC version.
- Use the makefile.g95 files for compiling wxWindows and samples, - Use the makefile.g95 files for compiling wxWindows and samples,
e.g. to compile a debugging version of wxWindows: e.g. to compile a debugging version of wxWindows:
@@ -571,11 +571,12 @@ Here are the steps required using the provided makefiles:
> make -f makefile.g95 cleanall > make -f makefile.g95 cleanall
> make -f makefile.g95 UNICODE=1 > make -f makefile.g95 UNICODE=1
Options can be combined ( e.g.: UNICODE=1 FINAL=1 ) Options can be combined (e.g.: UNICODE=1 FINAL=1)
Ignore the warning about the default entry point. Ignore the warning about the default entry point.
- Use the 'strip' command to reduce executable size. - Use the 'strip' command to reduce executable/dll size (note that
stripping an executable/dll will remove debug information!).
- With Cygwin, you can invoke gdb --nw myfile.exe to - With Cygwin, you can invoke gdb --nw myfile.exe to
debug an executable. If there are memory leaks, they will be debug an executable. If there are memory leaks, they will be
@@ -594,8 +595,7 @@ system to generate appropriate makefiles, as used on Unix
and Mac OS X systems. and Mac OS X systems.
Change directory to the root of the wxWindows distribution, Change directory to the root of the wxWindows distribution,
make a build directory, run 'sh', and then from this shell make a build directory, and run configure and make in this directory.
run configure and make.
For example: For example:
@@ -611,13 +611,13 @@ For example:
Notes: Notes:
1. See also the Cygwin/Mingw32 on the web site or CD-ROM for 1. See also the Cygwin/MinGW on the web site or CD-ROM for
further information about using wxWindows with these compilers. further information about using wxWindows with these compilers.
2. libwx.a is 100 MB or more - but much less if compiled with no 2. libwx.a is 100 MB or more - but much less if compiled with no
debug info (-g0) and level 4 optimization (-O4). debug info (-g0) and level 4 optimization (-O4).
3. If you get a link error under Mingw32 2.95.2 referring to: 3. If you get a link error under MinGW 2.95.2 referring to:
EnumDAdvise__11IDataObjectPP13IEnumSTATDATA@8 EnumDAdvise__11IDataObjectPP13IEnumSTATDATA@8
@@ -626,7 +626,7 @@ Notes:
STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**) PURE; STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**) PURE;
4. There's a bug in Mingw32 headers for some early distributions. 4. There's a bug in MinGW headers for some early distributions.
in include/windows32/defines.h, where it says: in include/windows32/defines.h, where it says:
@@ -645,7 +645,7 @@ Notes:
6. If there's a problem executing the windres program, try 6. If there's a problem executing the windres program, try
commenting out RCPREPROCESSOR in makeg95.env. commenting out RCPREPROCESSOR in makeg95.env.
7. OpenGL support should work with Mingw32 as-is. However, 7. OpenGL support should work with MinGW as-is. However,
if you wish to generate import libraries appropriate either for if you wish to generate import libraries appropriate either for
the MS OpenGL libraries or the SGI OpenGL libraries, go to the MS OpenGL libraries or the SGI OpenGL libraries, go to
include/wx/msw/gl and use: include/wx/msw/gl and use:
@@ -670,9 +670,9 @@ Notes:
OLD VERSIONS: OLD VERSIONS:
- If using Mingw32 2.95 and below with wxWindows 2.1 or above, you - If using MinGW 2.95 and below with wxWindows 2.1 or above, you
must hand-patch with Mingw32-gcc295.patches (located in the must hand-patch with Mingw32-gcc295.patches (located in the
top-level of the wxWindows 2 installation). Mingw32 2.95.2 top-level of the wxWindows 2 installation). MinGW 2.95.2
and above contain the fixes already. and above contain the fixes already.
- Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat) - Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat)
@@ -685,7 +685,7 @@ OLD VERSIONS:
supplied). supplied).
- If using GnuWin32 b18, you will need to copy windres.exe - If using GnuWin32 b18, you will need to copy windres.exe
from e.g. the Mingw32 distribution, to a directory in your path. from e.g. the MinGW distribution, to a directory in your path.
Symantec C++ compilation Symantec C++ compilation
------------------------ ------------------------