📄 install-msw.txt
字号:
Installing wxWidgets 2.6.3
-----------------------------------------------------------
This is wxWidgets 2.6.3 for Microsoft Windows 9x/ME, Windows NT,
Windows 2000, Windows XP and Windows CE.
These installation notes can be found in docs/msw/install.txt
in your wxWidgets distribution.
IMPORTANT NOTE: If you experience problems installing, please
re-read this instructions and other related files (changes.txt,
readme.txt, FAQ) carefully before mailing wx-users. Preferably,
try to fix the problem first and then upload a patch to
SourceForge:
http://sourceforge.net/patch/?group_id=9863
Please report bugs using the SourceForge bug tracker:
http://sourceforge.net/bugs/?group_id=9863
Unarchiving
============================================================
A setup program is provided (setup.exe) to automatically copy
files to a directory on your hard disk. Do not install into a
path that contains spaces.
The setup program contains the following:
- All common, generic and MSW-specific wxWidgets source;
- samples and demos;
- documentation in MS HTML Help format;
- makefiles for most Windows compilers, plus CodeWarrior,
BC++ and VC++ IDE files;
- JPEG library source;
- TIFF library source;
- Object Graphics Library, Tex2RTF, wxSTC, etc.
Alternatively, you may unarchive the .zip form by hand:
wxMSW-x.y.z.zip where x.y.z is the version number.
Unarchive the required files plus any optional documentation
files into a suitable directory such as c:\wx.
General installation notes
==========================
If installing from the CVS server, copy include/wx/msw/setup0.h to
include/wx/msw/setup.h and edit the resulting file to choose
the features you would like to compile wxWidgets with[out].
Compilation
===========
The following sections explain how to compile wxWidgets with each supported
compiler. Search for one of Microsoft/Borland/Watcom/Symantec/Metrowerks/
Cygwin/Mingw32 to quickly locate the instructions for your compiler.
All makefiles and project are located in build\msw directory.
Where compiled files are stored
-------------------------------
After successful compilation you'll find the libraries in a subdirectory
of lib directory named after the compiler and DLL/static settings.
A couple of examples:
lib\vc_lib VC++ compiled static libraries
lib\vc_dll VC++ DLLs
lib\bcc_lib Static libraries for Borland C++
lib\wat_dll Watcom C++ DLLs
Names of compiled wxWidgets libraries follow this scheme: libraries that don't
depend on GUI components begin with "wxbase" followed by version number and
letters indicating if the library is compiled as Unicode ('u') and/or debug
build ('d'). Last component of them name is name of wxWidgets component
(unless you built the library as single monolithic library; look for
"Configuring the build" below). This is a typical set of release ANSI build
libraries (release versions on left, debug on right side):
wxbase25.lib wxbase25d.lib
wxbase25_net.lib wxbase25d_net.lib
wxbase25_xml.lib wxbase25d_xml.lib
wxmsw25_core.lib wxmsw25d_core.lib
wxmsw25_html.lib wxmsw25d_html.lib
wxmsw25_adv.lib wxmsw25d_adv.lib
Their Unicode debug counterparts in wxUniversal build would be
wxbase25ud.lib
wxbase25ud_net.lib
wxbase25ud_xml.lib (notice these libs are same for wxUniv and wxMSW)
wxmswuniv25ud_core.lib
wxmswuniv25ud_html.lib
wxmswuniv25ud_adv.lib
These directories also contain subdirectory with wx/setup.h header. This
subdirectory is named after port, Unicode, wxUniv and debug settings and
you must add it to include paths when compiling your application. Some
examples:
lib\vc_lib\msw\wx\setup.h VC++ static, wxMSW
lib\vc_lib\mswud\wx\setup.h VC++ static, wxMSW, Unicode, debug
lib\vc_lib\mswunivd\wx\setup.h VC++ static, wxUniversal, debug
Below are compiler specific notes followed by customizing instructions that
apply to all compilers (search for "Configuring the build").
Microsoft Visual C++ compilation
----------------------------------------------------------------
You may wish to visit http://wiki.wxwindows.org/wiki.pl?MSVC for a more
informal and more detailed description of the process summarized below.
Please note that the VC++ 6.0 project files will work for VC++ .NET also.
VC++ 5.0 can also be used, providing Service Pack 3 is applied. Without it
you will have trouble with internal compiler errors. It is available for
download at: ftp://ftp.microsoft.com/developr/visualstudio/sp3/full.
Using project files (VC++ 6 and later):
1. Unarchive wxWidgets-x.y.z-vc.zip, the VC++ 6 project
makefiles (already included in wxMSW-x.y.z.zip and the setup version).
2. Open build\msw\wx.dsw, which has configurations for static
compilation or DLL compilation, and each of these available in
Unicode/ANSI, Debug/Release and wxUniversal or native variations.
Normally you'll use a static linking ANSI configuration.
Choose the Win32 Debug or Win32 Release configuration (or any other that
suits your needs) and use Batch Build to compile _all_ projects. If you
know you won't need some of the libraries (i.e. html part), you don't have
to compile it. It will also produce similar variations on jpeg.lib,
png.lib, tiff.lib, zlib.lib, and regex.lib.
If you want to build DLLs, you have to either build them one by one in
proper order (jpeg, png, tiff, zlib, regex, expat, base, core, the rest
in any order) or to use wx_dll.dsw workspace which has correct dependencies.
3. Open a sample project file, choose a configuration such as
Win32 Debug using Build | Set Active Configuration..., and compile.
The project files don't use precompiled headers, to save disk
space, but you can switch PCH compiling on for greater speed.
NOTE: you may also use samples/samples.dsw to access all
sample projects without opening each workspace individually.
You can use the Batch Build facility to make several samples
at a time.
Using makefiles:
1. Change directory to build\msw. Type:
'nmake -f makefile.vc'
to make the wxWidgets core library as release DLL.
See "Configuring the build" for instruction how to build debug or static
libraries.
2. Change directory to samples and type 'nmake -f makefile.vc'
to make all the samples. You can also make them individually.
Makefile notes:
Use the 'clean' target to clean all objects, libraries and
executables.
Note (1): if you wish to use templates, please edit
include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0.
Without this, the redefinition of 'new' will cause problems in
the headers. Alternatively, #undef new before including template headers.
You will also need to set wxUSE_IOSTREAMH to 0 if you will be
using templates, to avoid the non-template stream files being included
within wxWidgets.
Note (2): libraries and applications generated with makefiles and
project files are now (hopefully) compatible where static libraries
are concerned, but please exercise caution nevertheless and if
possible, use one method or the other.
Note (3): some crash problems can be due to inconsistent compiler
options. If strange/weird/impossible things start to happen please
check (dumping IDE project file as makefile and doing text comparison
if necessary) that the project settings, especially the list of defined
symbols, struct packing, etc. are exactly the same for all items in
the project. After this, delete everything (including PCH) and recompile.
Note (4): to create your own IDE files, copy .dsp and .dsw
files from an existing wxWidgets sample and adapt them, or
visit http://wiki.wxwindows.org/wiki.pl?MSVC.
Microsoft Visual C++ compilation for 64-bit Windows
----------------------------------------------------------------
Visual Studio 2005 includes 64-bit compilers, though they are not installed by
default; you need to select them during the installation. Both native 64-bit
compilers and 32-bit hosted cross compilers are included, so you do not need a
64-bit machine to use them (though you do to run the created executables).
Visual C++ Express Edition does not include 64-bit compilers.
64-bit compilers are also available in various SDKs, for example
the .NET Framework SDK:
http://msdn.microsoft.com/netframework/programming/64bit/devtools/
Using project files:
1. Open the VC++ 6 workspace file: build\msw\wx.dsw. Visual Studio will then
convert the projects to the current Visual C++ project format.
2. To add 64-bit targets, go to the 'Build' menu and choose 'Configuration
Manager...'. In the 'Active solution platform' drop down choose '<new>',
then you can choose either 'Itanium' or 'x64'.
For more detailed instructions see:
http://msdn2.microsoft.com/en-us/library/9yb4317s(en-us,vs.80).aspx
Note: 64-bit targets created this way will use the build directory of the
corresponding 32-bit target for some files. Therefore after building
for one CPU it is necessary to clean the build before building the
equivalent target for another CPU. We've reported the problem to MS
but they say it is not possible to fix it.
3. To build, go to the 'Build' menu and choose 'Batch Build...'. Tick all the
all the 'x64|Debug' or all the 'Itanium|Debug' projects, and click 'Build'.
This will build a debug version of the static libs. The section above on
Visual C++ in general has more information about adjusting the settings to
build other configurations.
4. To compile one of the samples open one of the sample projects, such as
samples\minimal\minimal.dsw. Visual Studio will convert the project as in
step 1, then add a 64-bit target as in step 2, and build.
Using makefiles:
1. Open a 64-bit build command prompt, for either x64 or Itanium. Change
directory to build\msw. Then for x64 type:
nmake -f makefile.vc TARGET_CPU=AMD64
or for Itanium:
nmake -f makefile.vc TARGET_CPU=IA64
This will build a debug version of wxWidgets DLLs. See "Configuring the
build" for instruction how to build other configurations such as a release
build or static libraries.
2. Change to the directory of one of the samples such as samples\minimal. Type
the same command used to build the main library, for example for x64:
nmake -f makefile.vc TARGET_CPU=AMD64
Notes:
The versions of the VC++ 8 compiler included with some SDKs requires an
additional library to be linked or the following error is received.
LNK2001 unresolved external symbol __security_check_cookie
If you receive this error add bufferoverflowu.lib to link, e.g.:
nmake -f makefile.vc TARGET_CPU=AMD64 LDFLAGS=bufferoverflowu.lib
See http://support.microsoft.com/?id=894573 for more information.
Borland C++ 5.0/5.5 compilation
----------------------------------------------------------------
Compiling using the makefiles (updated 24 Sept 02):
1. Change directory to build\msw. Type 'make -f makefile.bcc' to
make the wxWidgets core library. Ignore the compiler warnings.
This produces a couple of libraries in the lib\bcc_lib directory.
2. Change directory to a sample or demo such as samples\minimal, and type
'make -f makefile.bcc'. This produces a windows exe file - by default
in the bcc_mswd subdirectory.
Note (1): the wxWidgets makefiles assume dword structure alignment. Please
make sure that your own project or makefile settings use the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -