Merge branch 'doc_platform_restructure' of https://github.com/TcT2k/wxWidgets
Integrate platform build instructions into documentation. See https://github.com/wxWidgets/wxWidgets/pull/960
This commit is contained in:
@@ -292,6 +292,13 @@ WARN_LOGFILE = doxygen.log
|
|||||||
INPUT = mainpages \
|
INPUT = mainpages \
|
||||||
groups \
|
groups \
|
||||||
overviews \
|
overviews \
|
||||||
|
../gtk \
|
||||||
|
../ios \
|
||||||
|
../motif \
|
||||||
|
../msw \
|
||||||
|
../osx \
|
||||||
|
../qt \
|
||||||
|
../x11 \
|
||||||
../../interface
|
../../interface
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *.h *.md
|
FILE_PATTERNS = *.h *.md
|
||||||
|
@@ -52,8 +52,9 @@ GTK+ 1.2 can still be used, albeit discouraged. For that you can pass
|
|||||||
Support for GTK+ 3 is available starting with wxWidgets 2.9.4, use @c configure
|
Support for GTK+ 3 is available starting with wxWidgets 2.9.4, use @c configure
|
||||||
option @c \--with-gtk=3 to enable it.
|
option @c \--with-gtk=3 to enable it.
|
||||||
|
|
||||||
For further information, please see the files in @c docs/gtk in the
|
@subpage plat_gtk_install "Build and Install Instructions"
|
||||||
distribution.
|
|
||||||
|
@subpage plat_gtk_overview "wxWidgets on the GNOME Desktop"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -62,8 +63,7 @@ distribution.
|
|||||||
wxOSX/Cocoa is the port of wxWidgets for the OS X platform. It requires
|
wxOSX/Cocoa is the port of wxWidgets for the OS X platform. It requires
|
||||||
OS X 10.7 or later and fully supports 64 bit builds.
|
OS X 10.7 or later and fully supports 64 bit builds.
|
||||||
|
|
||||||
For further information, please see the files in @c docs/osx in the
|
@subpage plat_osx_install "Build and Install Instructions"
|
||||||
distribution.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -80,8 +80,9 @@ In order to configure wxWidgets to compile wxX11 you will need to type:
|
|||||||
|
|
||||||
@verbatim configure --with-x11 --with-universal @endverbatim
|
@verbatim configure --with-x11 --with-universal @endverbatim
|
||||||
|
|
||||||
For further information, please see the files in @c docs/x11 in the
|
@subpage plat_x11_install "Build Instructions"
|
||||||
distribution. There is also a page on the use of wxWidgets for embedded
|
|
||||||
|
There is also a page on the use of wxWidgets for embedded
|
||||||
applications on the wxWidgets web site.
|
applications on the wxWidgets web site.
|
||||||
|
|
||||||
|
|
||||||
@@ -92,8 +93,8 @@ wxMotif is a port of wxWidgets for X11 systems using Motif libraries. Motif
|
|||||||
libraries provide a clean and fast user interface at the expense of the beauty
|
libraries provide a clean and fast user interface at the expense of the beauty
|
||||||
and candy of newer interfaces like GTK.
|
and candy of newer interfaces like GTK.
|
||||||
|
|
||||||
For further information, please see the files in @c docs/motif in the
|
@subpage plat_motif_install "Build Instructions"
|
||||||
distribution.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -105,7 +106,9 @@ This port can be compiled with several compilers including Microsoft Studio
|
|||||||
VC++ 2003 or later, Borland 5.5, MinGW32, Cygwin as well as cross-compilation
|
VC++ 2003 or later, Borland 5.5, MinGW32, Cygwin as well as cross-compilation
|
||||||
with a Linux-hosted MinGW32 tool chain.
|
with a Linux-hosted MinGW32 tool chain.
|
||||||
|
|
||||||
For further information, please see the files in docs/msw in the distribution.
|
@subpage plat_msw_install "Build and Install Instructions"
|
||||||
|
|
||||||
|
@subpage plat_msw_binaries "Using pre-built binaries"
|
||||||
|
|
||||||
@subsection page_port_wxmsw_resources Resources and Application Icon
|
@subsection page_port_wxmsw_resources Resources and Application Icon
|
||||||
|
|
||||||
@@ -167,7 +170,9 @@ wxWindowBase::GetDefaultBorder(), returning wxBORDER_NONE.
|
|||||||
|
|
||||||
wxQt is a port of wxWidgets using Qt libraries. It requires Qt 5 or later.
|
wxQt is a port of wxWidgets using Qt libraries. It requires Qt 5 or later.
|
||||||
|
|
||||||
For further information, please see the files in docs/qt in the distribution.
|
@subpage plat_qt_install "Build Instructions"
|
||||||
|
|
||||||
|
@subpage plat_qt_architecture "Architecture Overview"
|
||||||
|
|
||||||
@section page_port_wxiOS wxiOS
|
@section page_port_wxiOS wxiOS
|
||||||
|
|
||||||
@@ -175,7 +180,7 @@ wxiOS is a port of wxWidgets using Cocoa touch libraries for iOS. It is very
|
|||||||
basic in it current form, but is included for further improvements and very
|
basic in it current form, but is included for further improvements and very
|
||||||
simple applications. It requires iOS 9 or later and fully supports 64 bit builds.
|
simple applications. It requires iOS 9 or later and fully supports 64 bit builds.
|
||||||
|
|
||||||
For further information, please see the files in docs/ios in the distribution.
|
@subpage plat_ios_install "Build Instructions"
|
||||||
|
|
||||||
@section page_port_nativedocs Native Toolkit Documentation
|
@section page_port_nativedocs Native Toolkit Documentation
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
wxWidgets for GTK+ installation
|
wxWidgets for GTK+ installation {#plat_gtk_install}
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
IMPORTANT NOTE:
|
IMPORTANT NOTE:
|
||||||
|
|
||||||
If you experience problems installing, please re-read these
|
If you experience problems installing, please re-read these
|
||||||
@@ -13,19 +15,24 @@ IMPORTANT NOTE:
|
|||||||
using (including the beta) and what compiler on what system. One
|
using (including the beta) and what compiler on what system. One
|
||||||
example: wxGTK 3.0.0, GCC 4.8.1, Fedora 19
|
example: wxGTK 3.0.0, GCC 4.8.1, Fedora 19
|
||||||
|
|
||||||
* The simplest case
|
Installation {#gtk_install}
|
||||||
|
============
|
||||||
|
|
||||||
|
|
||||||
|
The simplest case {#gtk_simple}
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
If you compile wxWidgets on Linux for the first time and don't like to read
|
If you compile wxWidgets on Linux for the first time and don't like to read
|
||||||
install instructions just do (in the base dir):
|
install instructions just do (in the base dir):
|
||||||
|
|
||||||
> mkdir buildgtk
|
> mkdir buildgtk
|
||||||
> cd buildgtk
|
> cd buildgtk
|
||||||
> ../configure --with-gtk
|
> ../configure --with-gtk
|
||||||
> make
|
> make
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make install
|
> make install
|
||||||
> ldconfig
|
> ldconfig
|
||||||
|
|
||||||
[if you get "ldconfig: command not found", try using "/sbin/ldconfig"]
|
[if you get "ldconfig: command not found", try using "/sbin/ldconfig"]
|
||||||
|
|
||||||
If you don't do the 'make install' part, you can still use the libraries from
|
If you don't do the 'make install' part, you can still use the libraries from
|
||||||
@@ -33,14 +40,14 @@ the buildgtk directory, but they may not be available to other users.
|
|||||||
|
|
||||||
If you want to remove wxWidgets on Unix you can do this:
|
If you want to remove wxWidgets on Unix you can do this:
|
||||||
|
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make uninstall
|
> make uninstall
|
||||||
> ldconfig
|
> ldconfig
|
||||||
|
|
||||||
Note that by default, GTK+ 2.x is used. GTK+ 3 can be specified
|
Note that by default, GTK+ 2.x is used. GTK+ 3 can be specified
|
||||||
with --with-gtk=3.
|
with --with-gtk=3.
|
||||||
|
|
||||||
* The expert case
|
The expert case {#gtk_expert}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
If you want to do some more serious cross-platform programming with wxWidgets,
|
If you want to do some more serious cross-platform programming with wxWidgets,
|
||||||
@@ -53,28 +60,28 @@ with --enable-debug and one without.
|
|||||||
For building three versions (one GTK+, one Motif and a debug version of the GTK
|
For building three versions (one GTK+, one Motif and a debug version of the GTK
|
||||||
source) you'd do this:
|
source) you'd do this:
|
||||||
|
|
||||||
mkdir buildmotif
|
mkdir buildmotif
|
||||||
cd buildmotif
|
cd buildmotif
|
||||||
../configure --with-motif
|
../configure --with-motif
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir buildgtk
|
mkdir buildgtk
|
||||||
cd buildgtk
|
cd buildgtk
|
||||||
../configure --with-gtk
|
../configure --with-gtk
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir buildgtkd
|
mkdir buildgtkd
|
||||||
cd buildgtkd
|
cd buildgtkd
|
||||||
../configure --with-gtk --enable-debug
|
../configure --with-gtk --enable-debug
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
Note that you can install all those libraries concurrently, you just need to
|
Note that you can install all those libraries concurrently, you just need to
|
||||||
pass the appropriate flags when using them.
|
pass the appropriate flags when using them.
|
||||||
|
|
||||||
* The simplest errors
|
The simplest errors {#gtk_errors_simple}
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
For any configure errors: please look at config.log file which was generated
|
For any configure errors: please look at config.log file which was generated
|
||||||
@@ -101,18 +108,18 @@ GCC 2.95 or later.
|
|||||||
|
|
||||||
You get immediate segfault when starting any sample or application: This is
|
You get immediate segfault when starting any sample or application: This is
|
||||||
either due to having compiled the library with different flags or options than
|
either due to having compiled the library with different flags or options than
|
||||||
your program - typically you might have the __WXDEBUG__ option set for the
|
your program - typically you might have the `__WXDEBUG__` option set for the
|
||||||
library but not for your program - or due to using a compiler with optimisation
|
library but not for your program - or due to using a compiler with optimisation
|
||||||
bugs.
|
bugs.
|
||||||
|
|
||||||
* The simplest program
|
The simplest program {#gtk_simple_app}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Now create your super-application myfoo.cpp and compile anywhere with
|
Now create your super-application myfoo.cpp and compile anywhere with
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
||||||
|
|
||||||
* GUI libraries
|
GUI libraries {#gtk_libs_gui}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
wxWidgets/GTK+ requires the GTK+ library to be installed on your system. It has
|
wxWidgets/GTK+ requires the GTK+ library to be installed on your system. It has
|
||||||
@@ -127,7 +134,7 @@ You can get the newest version of the GTK+ from the GTK+ homepage at:
|
|||||||
We also mirror GTK+ at my ftp site. You'll find information about downloading
|
We also mirror GTK+ at my ftp site. You'll find information about downloading
|
||||||
at my homepage.
|
at my homepage.
|
||||||
|
|
||||||
* Additional libraries
|
Additional libraries {#gtk_libs_misc}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
wxWidgets/Gtk requires a thread library and X libraries known to work with
|
wxWidgets/Gtk requires a thread library and X libraries known to work with
|
||||||
@@ -138,14 +145,14 @@ correct glibc 2 support.
|
|||||||
|
|
||||||
You can disable thread support by running
|
You can disable thread support by running
|
||||||
|
|
||||||
./configure --disable-threads
|
./configure --disable-threads
|
||||||
make
|
make
|
||||||
su <type root password>
|
su <type root password>
|
||||||
make install
|
make install
|
||||||
ldconfig
|
ldconfig
|
||||||
exit
|
exit
|
||||||
|
|
||||||
* Building wxGTK on Cygwin
|
Building wxGTK on Cygwin {#gtk_cygwin}
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
The normal build instructions should work fine on Cygwin. The one difference
|
The normal build instructions should work fine on Cygwin. The one difference
|
||||||
@@ -159,10 +166,11 @@ will see linking errors. If this happens then you can work around the
|
|||||||
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
|
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
|
||||||
about it on the wx-dev mailing list.
|
about it on the wx-dev mailing list.
|
||||||
|
|
||||||
* Create your configuration
|
Create your configuration {#gtk_config}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
./configure options
|
./configure options
|
||||||
|
|
||||||
If you want to use system's C and C++ compiler,
|
If you want to use system's C and C++ compiler,
|
||||||
@@ -182,7 +190,7 @@ have multiple configurations (for example, debug and release or GTK
|
|||||||
and Motif) simultaneously.
|
and Motif) simultaneously.
|
||||||
|
|
||||||
|
|
||||||
* General options
|
General options {#gtk_options}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Given below are the commands to change the default behaviour,
|
Given below are the commands to change the default behaviour,
|
||||||
@@ -259,7 +267,7 @@ The following options handle the kind of library you want to build.
|
|||||||
option instead of --enable-debug_info/flag ones
|
option instead of --enable-debug_info/flag ones
|
||||||
separately.
|
separately.
|
||||||
|
|
||||||
* Feature Options
|
Feature Options {#gtk_feature_options}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
When producing an executable that is linked statically with wxGTK
|
When producing an executable that is linked statically with wxGTK
|
||||||
@@ -316,7 +324,7 @@ Please see the output of "./configure --help" for comprehensive list
|
|||||||
of all configurable options.
|
of all configurable options.
|
||||||
|
|
||||||
|
|
||||||
* Compiling
|
Compiling {#gtk_compling}
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The following must be done in the base directory (e.g. ~/wxGTK
|
The following must be done in the base directory (e.g. ~/wxGTK
|
||||||
@@ -352,43 +360,36 @@ make clean
|
|||||||
|
|
||||||
in the various directories will do the work for you.
|
in the various directories will do the work for you.
|
||||||
|
|
||||||
* Creating a new Project
|
Creating a new Project {#gtk_new_project}
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
1) The first way uses the installed libraries and header files
|
1. The first way uses the installed libraries and header files
|
||||||
automatically using wx-config
|
automatically using wx-config
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --cxxflags --libs` -o myfoo
|
g++ myfoo.cpp `wx-config --cxxflags --libs` -o myfoo
|
||||||
|
|
||||||
Using this way, a make file for the minimal sample would look
|
Using this way, a make file for the minimal sample would look
|
||||||
like this
|
like this
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
|
||||||
minimal: minimal.o
|
minimal: minimal.o
|
||||||
$(CXX) -o minimal minimal.o `wx-config --libs`
|
$(CXX) -o minimal minimal.o `wx-config --libs`
|
||||||
|
|
||||||
minimal.o: minimal.cpp
|
minimal.o: minimal.cpp
|
||||||
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
|
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o minimal
|
rm -f *.o minimal
|
||||||
|
|
||||||
If your application uses only some of wxWidgets libraries, you can
|
If your application uses only some of wxWidgets libraries, you can
|
||||||
specify required libraries when running wx-config. For example,
|
specify required libraries when running wx-config. For example,
|
||||||
`wx-config --libs=html,core` will only output link command to link
|
`wx-config --libs=html,core` will only output link command to link
|
||||||
with libraries required by core GUI classes and wxHTML classes. See
|
with libraries required by core GUI classes and wxHTML classes. See
|
||||||
the manual for more information on the libraries.
|
the manual for more information on the libraries.
|
||||||
|
|
||||||
2) The other way creates a project within the source code
|
2. The other way creates a project within the source code
|
||||||
directories of wxWidgets. For this endeavour, you'll need
|
directories of wxWidgets. For this endeavour, you'll need
|
||||||
GNU autoconf version 2.14 and add an entry to your Makefile.in
|
GNU autoconf version 2.14 and add an entry to your Makefile.in
|
||||||
to the bottom of the configure.in script and run autoconf
|
to the bottom of the configure.in script and run autoconf
|
||||||
and configure before you can type make.
|
and configure before you can type make.
|
||||||
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
In the hope that it will be useful,
|
|
||||||
|
|
||||||
Robert Roebling
|
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
# wxWidgets on the GNOME Desktop
|
# wxWidgets on the GNOME Desktop {#plat_gtk_overview}
|
||||||
|
|
||||||
wxWidgets is a C++ cross-platform GUI library, whose distintive feature is the
|
wxWidgets is a C++ cross-platform GUI library, whose distintive feature is the
|
||||||
use of native calls and native widgets on the respective platform, i.e. an
|
use of native calls and native widgets on the respective platform, i.e. an
|
||||||
|
27
docs/ios/install.md
Normal file
27
docs/ios/install.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
Building wxWidgets for iOS {#plat_ios_install}
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
wxiOS is far from a full supported port, but can be used
|
||||||
|
as base for simple applications and future improvements.
|
||||||
|
|
||||||
|
It requires Xcode with iOS SDK 9.0 or later. Xcode is available
|
||||||
|
for free in the OS X app store.
|
||||||
|
|
||||||
|
To build wxiOS you should use Xcode to open the minimal samples
|
||||||
|
Xcode project file located at:
|
||||||
|
|
||||||
|
samples/minimal/minimal_iphone.xcodeproj
|
||||||
|
|
||||||
|
That project files includes wxiphone.xcodeproj so you just need
|
||||||
|
to hit run in order to see the minimal sample running in the
|
||||||
|
simulator.
|
||||||
|
|
||||||
|
The library can also be build via configure/make:
|
||||||
|
|
||||||
|
mkdir build_ios
|
||||||
|
cd build_ios
|
||||||
|
../configure --with-osx_iphone --enable-monolithic \
|
||||||
|
--with-macosx-version-min=8.0 --disable-shared \
|
||||||
|
--enable-macosx_arch=i386 \
|
||||||
|
--with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path)
|
||||||
|
make
|
@@ -4,35 +4,6 @@
|
|||||||
wxiOS is far from a full supported port, but can be used
|
wxiOS is far from a full supported port, but can be used
|
||||||
as base for simple applications and future improvements.
|
as base for simple applications and future improvements.
|
||||||
|
|
||||||
It requires Xcode with iOS SDK 9.0 or later. Xcode is available
|
|
||||||
for free in the OS X app store.
|
|
||||||
|
|
||||||
More info about the wxWidgets project (including all the
|
|
||||||
other ports and version of wxWidgets) can be found at the
|
|
||||||
main wxWidgets homepage at:
|
|
||||||
|
|
||||||
https://www.wxwidgets.org/
|
|
||||||
|
|
||||||
To build wxiOS you should use Xcode to open the minimal samples
|
|
||||||
Xcode project file located at:
|
|
||||||
|
|
||||||
samples/minimal/minimal_iphone.xcodeproj
|
|
||||||
|
|
||||||
That project files includes wxiphone.xcodeproj so you just need
|
|
||||||
to hit run in order to see the minimal sample running in the
|
|
||||||
simulator.
|
|
||||||
|
|
||||||
The library can also be build via configure/make:
|
|
||||||
|
|
||||||
mkdir build_ios
|
|
||||||
cd build_ios
|
|
||||||
../configure --with-osx_iphone --enable-monolithic \
|
|
||||||
--with-macosx-version-min=8.0 --disable-shared \
|
|
||||||
--enable-macosx_arch=i386 \
|
|
||||||
--with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path)
|
|
||||||
make
|
|
||||||
|
|
||||||
|
|
||||||
Please send problems concerning installation, feature requests,
|
Please send problems concerning installation, feature requests,
|
||||||
bug reports or comments to the wxWidgets users list. These can
|
bug reports or comments to the wxWidgets users list. These can
|
||||||
be found at https://www.wxwidgets.org/support/mailing-lists/
|
be found at https://www.wxwidgets.org/support/mailing-lists/
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
wxWidgets for Motif installation
|
wxWidgets for Motif installation {#plat_motif_install}
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
IMPORTANT NOTE:
|
IMPORTANT NOTE:
|
||||||
|
|
||||||
If you experience problems installing, please re-read these
|
If you experience problems installing, please re-read these
|
||||||
@@ -40,38 +42,38 @@ First steps
|
|||||||
config.log file).
|
config.log file).
|
||||||
|
|
||||||
|
|
||||||
COMPILING USING CONFIGURE
|
Compiling using configure {#motif_configure}
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
* The simplest case
|
The simplest case {#motif_simple}
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
If you compile wxWidgets on Linux for the first time and don't like to read
|
If you compile wxWidgets on Linux for the first time and don't like to read
|
||||||
install instructions just do (in the base dir):
|
install instructions just do (in the base dir):
|
||||||
|
|
||||||
> ./configure --with-motif
|
> ./configure --with-motif
|
||||||
> make
|
> make
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make install
|
> make install
|
||||||
> ldconfig
|
> ldconfig
|
||||||
> exit
|
> exit
|
||||||
|
|
||||||
Afterwards you can continue with
|
Afterwards you can continue with
|
||||||
|
|
||||||
> make
|
> make
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make install
|
> make install
|
||||||
> ldconfig
|
> ldconfig
|
||||||
> exit
|
> exit
|
||||||
|
|
||||||
If you want to remove wxWidgets on Unix you can do this:
|
If you want to remove wxWidgets on Unix you can do this:
|
||||||
|
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make uninstall
|
> make uninstall
|
||||||
> ldconfig
|
> ldconfig
|
||||||
> exit
|
> exit
|
||||||
|
|
||||||
* The expert case
|
The expert case {#motif_expert}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
If you want to do some more serious cross-platform programming with wxWidgets,
|
If you want to do some more serious cross-platform programming with wxWidgets,
|
||||||
@@ -84,28 +86,28 @@ with --enable-debug and one without.
|
|||||||
For building three versions (one GTK, one Motif and a debug version of the GTK
|
For building three versions (one GTK, one Motif and a debug version of the GTK
|
||||||
source) you'd do this:
|
source) you'd do this:
|
||||||
|
|
||||||
mkdir buildmotif
|
mkdir buildmotif
|
||||||
cd buildmotif
|
cd buildmotif
|
||||||
../configure --with-motif
|
../configure --with-motif
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir buildgtk
|
mkdir buildgtk
|
||||||
cd buildgtk
|
cd buildgtk
|
||||||
../configure --with-gtk
|
../configure --with-gtk
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir buildgtkd
|
mkdir buildgtkd
|
||||||
cd buildgtkd
|
cd buildgtkd
|
||||||
../configure --with-gtk --enable-debug
|
../configure --with-gtk --enable-debug
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
Note that since wxWidgets-2.6.0 you can install all those libraries
|
Note that since wxWidgets-2.6.0 you can install all those libraries
|
||||||
concurrently, you just need to pass the appropriate flags when using them.
|
concurrently, you just need to pass the appropriate flags when using them.
|
||||||
|
|
||||||
* The simplest errors
|
The simplest errors {#motif_error_simple}
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
You get errors during compilation: The reason is that you probably have a
|
You get errors during compilation: The reason is that you probably have a
|
||||||
@@ -115,18 +117,18 @@ GCC 2.95 or later.
|
|||||||
|
|
||||||
You get immediate segfault when starting any sample or application: This is
|
You get immediate segfault when starting any sample or application: This is
|
||||||
either due to having compiled the library with different flags or options than
|
either due to having compiled the library with different flags or options than
|
||||||
your program - typically you might have the __WXDEBUG__ option set for the
|
your program - typically you might have the `__WXDEBUG__` option set for the
|
||||||
library but not for your program - or due to using a compiler with optimisation
|
library but not for your program - or due to using a compiler with optimisation
|
||||||
bugs.
|
bugs.
|
||||||
|
|
||||||
* The simplest program
|
The simplest program {#motif_simple_app}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Now create your super-application myfoo.app and compile anywhere with
|
Now create your super-application myfoo.app and compile anywhere with
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
||||||
|
|
||||||
* General
|
General {#motif_general}
|
||||||
---------
|
---------
|
||||||
|
|
||||||
The Unix variants of wxWidgets use GNU configure. If you have problems with
|
The Unix variants of wxWidgets use GNU configure. If you have problems with
|
||||||
@@ -134,7 +136,7 @@ your make use GNU make instead.
|
|||||||
|
|
||||||
If you have general problems with installation, see the wxWidgets website at
|
If you have general problems with installation, see the wxWidgets website at
|
||||||
|
|
||||||
https://www.wxwidgets.org/
|
https://www.wxwidgets.org/
|
||||||
|
|
||||||
for newest information. If you still don't have any success, please send a bug
|
for newest information. If you still don't have any success, please send a bug
|
||||||
report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
|
report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
|
||||||
@@ -142,7 +144,7 @@ YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF MOTIF, WXMOTIF, WHAT
|
|||||||
DISTRIBUTION YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect,
|
DISTRIBUTION YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect,
|
||||||
but I tried...
|
but I tried...
|
||||||
|
|
||||||
* GUI libraries
|
GUI libraries {#motif_libs_gui}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
wxWidgets/Motif requires the Motif library to be installed on your system. As
|
wxWidgets/Motif requires the Motif library to be installed on your system. As
|
||||||
@@ -151,9 +153,9 @@ most of the Motif API without the licence restrictions of Motif.
|
|||||||
|
|
||||||
You can get the newest version of the Lesstif from the lesstif homepage at:
|
You can get the newest version of the Lesstif from the lesstif homepage at:
|
||||||
|
|
||||||
http://lesstif.sourceforge.net/
|
http://lesstif.sourceforge.net/
|
||||||
|
|
||||||
* Additional libraries
|
Additional libraries {#motif_libs_misc}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
wxWidgets/Motif requires a thread library and X libraries known to work with
|
wxWidgets/Motif requires a thread library and X libraries known to work with
|
||||||
@@ -164,14 +166,14 @@ correct glibc 2 support.
|
|||||||
|
|
||||||
You can disable thread support by running
|
You can disable thread support by running
|
||||||
|
|
||||||
./configure --disable-threads
|
./configure --disable-threads
|
||||||
make
|
make
|
||||||
su <type root password>
|
su <type root password>
|
||||||
make install
|
make install
|
||||||
ldconfig
|
ldconfig
|
||||||
exit
|
exit
|
||||||
|
|
||||||
* Building wxMotif on Cygwin
|
Building wxMotif on Cygwin {#motif_cygwin}
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
The normal build instructions should work fine on Cygwin. The one difference
|
The normal build instructions should work fine on Cygwin. The one difference
|
||||||
@@ -185,10 +187,11 @@ will see linking errors. If this happens then you can work around the
|
|||||||
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
|
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
|
||||||
about it on the wx-dev mailing list.
|
about it on the wx-dev mailing list.
|
||||||
|
|
||||||
* Create your configuration
|
Create your configuration {#motif_config}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
./configure [options]
|
./configure [options]
|
||||||
|
|
||||||
If you want to use system's C and C++ compiler,
|
If you want to use system's C and C++ compiler,
|
||||||
@@ -216,7 +219,7 @@ Configure will complain if the system variable OSTYPE has
|
|||||||
not been defined. And Make in some circumstances as well...
|
not been defined. And Make in some circumstances as well...
|
||||||
|
|
||||||
|
|
||||||
* General options
|
General options {#motif_options}
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Given below are the commands to change the default behaviour,
|
Given below are the commands to change the default behaviour,
|
||||||
@@ -289,7 +292,7 @@ The following options handle the kind of library you want to build.
|
|||||||
must be compiled with the same debug
|
must be compiled with the same debug
|
||||||
options.
|
options.
|
||||||
|
|
||||||
* Feature Options
|
Feature Options {#motif_feature_options}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Many of the configure options have been thoroughly tested
|
Many of the configure options have been thoroughly tested
|
||||||
@@ -338,7 +341,7 @@ Please see the output of "./configure --help" for comprehensive list
|
|||||||
of all configurable options.
|
of all configurable options.
|
||||||
|
|
||||||
|
|
||||||
* Compiling
|
Compiling {#motif_compile}
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The following must be done in the base directory (e.g. ~/wxMotif
|
The following must be done in the base directory (e.g. ~/wxMotif
|
||||||
@@ -374,41 +377,41 @@ object-files:
|
|||||||
|
|
||||||
in the various directories will do the work for you.
|
in the various directories will do the work for you.
|
||||||
|
|
||||||
* Creating a new Project
|
Creating a new Project {#motif_new_project}
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
1) The first way uses the installed libraries and header files
|
1. The first way uses the installed libraries and header files
|
||||||
automatically using wx-config
|
automatically using wx-config
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --libs` `wx-config --cxxflags` -o myfoo
|
g++ myfoo.cpp `wx-config --libs` `wx-config --cxxflags` -o myfoo
|
||||||
|
|
||||||
Using this way, a make file for the minimal sample would look
|
Using this way, a make file for the minimal sample would look
|
||||||
like this
|
like this
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
|
||||||
minimal: minimal.o
|
minimal: minimal.o
|
||||||
$(CXX) -o minimal minimal.o `wx-config --libs`
|
$(CXX) -o minimal minimal.o `wx-config --libs`
|
||||||
|
|
||||||
minimal.o: minimal.cpp
|
minimal.o: minimal.cpp
|
||||||
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
|
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o minimal
|
rm -f *.o minimal
|
||||||
|
|
||||||
If your application uses only some of wxWidgets libraries, you can
|
If your application uses only some of wxWidgets libraries, you can
|
||||||
specify required libraries when running wx-config. For example,
|
specify required libraries when running wx-config. For example,
|
||||||
`wx-config --libs=html,core` will only output link command to link
|
`wx-config --libs=html,core` will only output link command to link
|
||||||
with libraries required by core GUI classes and wxHTML classes. See
|
with libraries required by core GUI classes and wxHTML classes. See
|
||||||
the manual for more information on the libraries.
|
the manual for more information on the libraries.
|
||||||
|
|
||||||
2) The other way creates a project within the source code
|
2. The other way creates a project within the source code
|
||||||
directories of wxWidgets. For this endeavour, you'll need
|
directories of wxWidgets. For this endeavour, you'll need
|
||||||
GNU autoconf version 2.14 and add an entry to your Makefile.in
|
GNU autoconf version 2.14 and add an entry to your Makefile.in
|
||||||
to the bottom of the configure.in script and run autoconf
|
to the bottom of the configure.in script and run autoconf
|
||||||
and configure before you can type make.
|
and configure before you can type make.
|
||||||
|
|
||||||
* Further notes by Julian Smart
|
Further notes by Julian Smart {#motif_notes}
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
- You may find the following script useful for compiling wxMotif,
|
- You may find the following script useful for compiling wxMotif,
|
||||||
@@ -416,25 +419,23 @@ and configure before you can type make.
|
|||||||
permissions). Make this script executable with the command
|
permissions). Make this script executable with the command
|
||||||
chmod a+x makewxmotif.
|
chmod a+x makewxmotif.
|
||||||
|
|
||||||
-------:x-----Cut here-----:x-----
|
# makewxmotif
|
||||||
# makewxmotif
|
# Sets permissions (in case we extracted wxMotif from zip files)
|
||||||
# Sets permissions (in case we extracted wxMotif from zip files)
|
# and makes wxMotif.
|
||||||
# and makes wxMotif.
|
# Call from top-level wxWidgets directory.
|
||||||
# Call from top-level wxWidgets directory.
|
# Note that this uses standard (but commonly-used) configure options;
|
||||||
# Note that this uses standard (but commonly-used) configure options;
|
# if you're feeling brave, you may wish to compile with threads:
|
||||||
# if you're feeling brave, you may wish to compile with threads:
|
# if they're not supported by the target platform, they will be disabled
|
||||||
# if they're not supported by the target platform, they will be disabled
|
# anyhow
|
||||||
# anyhow
|
# -- Julian Smart
|
||||||
# -- Julian Smart
|
chmod a+x configure config.sub config.guess
|
||||||
chmod a+x configure config.sub config.guess
|
./configure --with-shared --with-motif --with-debug_flag --with-debug_info --enable-debug --without-threads --without-sockets --without-odbc
|
||||||
./configure --with-shared --with-motif --with-debug_flag --with-debug_info --enable-debug --without-threads --without-sockets --without-odbc
|
make
|
||||||
make
|
|
||||||
-------:x-----Cut here-----:x-----
|
|
||||||
|
|
||||||
This script will build wxMotif using shared libraries. If you want to build
|
This script will build wxMotif using shared libraries. If you want to build
|
||||||
a static wxWidgets library, use --disable-shared.
|
a static wxWidgets library, use --disable-shared.
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting {#motif_troubleshoot}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
- Solaris compilation with gcc: if the compiler has problems with the variable
|
- Solaris compilation with gcc: if the compiler has problems with the variable
|
||||||
@@ -458,20 +459,10 @@ Troubleshooting
|
|||||||
If you find any incorrect instances, though, such as a
|
If you find any incorrect instances, though, such as a
|
||||||
missing 'const' in an overridden function, please let us know.
|
missing 'const' in an overridden function, please let us know.
|
||||||
|
|
||||||
Other Notes
|
Other Notes {#motif_misc}
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
- Using configure will create a release build of the library by
|
- Using configure will create a release build of the library by
|
||||||
default: it's recommended to use --enable-debug configure switch
|
default: it's recommended to use --enable-debug configure switch
|
||||||
while developing your application. To compile in non-debug mode, use
|
while developing your application. To compile in non-debug mode, use
|
||||||
--disable-debug configure switch.
|
--disable-debug configure switch.
|
||||||
|
|
||||||
Bug reports
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Please send bug reports with a description of your environment,
|
|
||||||
compiler and the error message(s) to the developers mailing list at:
|
|
||||||
|
|
||||||
https://www.wxwidgets.org/support/mailing-lists/
|
|
||||||
|
|
||||||
Julian Smart, Robert Roebling and Vadim Zeitlin, November 1999.
|
|
90
docs/msw/binaries.md
Normal file
90
docs/msw/binaries.md
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
How to use wxMSW binaries {#plat_msw_binaries}
|
||||||
|
=========================
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
Supported Compilers
|
||||||
|
-------------------
|
||||||
|
We provide pre-built binary files for the following compilers:
|
||||||
|
|
||||||
|
* Microsoft Visual C++ compiler versions 9.0, 10.0, 11.0, 12.0, 14.0 and 14.1
|
||||||
|
(corresponding to marketing product names of Microsoft Visual Studio 2008, 2010, 2012, 2013, 2015 and 2017 respectively).
|
||||||
|
* TDM-GCC version 5.1 and MinGW-w64 version 7.2 (with the default SJLJ
|
||||||
|
exceptions propagation method, using C++11). Please note that you need to use
|
||||||
|
the very latest MinGW-w64 7.2 compiler release with this version of the
|
||||||
|
compiler which can be downloaded from
|
||||||
|
[here for 32 bits](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.2.0/threads-win32/sjlj/i686-7.2.0-release-win32-sjlj-rt_v5-rev1.7z/download)
|
||||||
|
and
|
||||||
|
[here for 64 bits](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.2.0/threads-win32/seh/x86_64-7.2.0-release-win32-seh-rt_v5-rev1.7z/download),
|
||||||
|
the older "rev0" release has a known bug affecting building wxWidgets in
|
||||||
|
some scenarios.
|
||||||
|
|
||||||
|
|
||||||
|
Getting the files
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
First, you need to get the correct files. You will always need the
|
||||||
|
`wxWidgets-3.1.1-headers.7z` one but the rest depends on your compiler version
|
||||||
|
and architecture: as different versions of MSVC compiler are not binary
|
||||||
|
compatible, you should select the files with the correct
|
||||||
|
`vc80`, `vc90`, `vc100`, `vc110`, `vc120`, `vc140` or `vc141`
|
||||||
|
suffix depending on whether you use
|
||||||
|
Visual Studio 2005, 2008, 2010, 2012, 2013, 2015 or 2017 respectively.
|
||||||
|
You also need to decide whether you use the `x64` files for 64-bit development
|
||||||
|
or the ones without this suffix for the still more common 32-bit builds. After
|
||||||
|
determining the combination of suffixes you need, you should download the
|
||||||
|
"Dev" and the "ReleaseDLL" files in addition to the "Headers" one above,
|
||||||
|
e.g. for 32-bit MSVS 2017 development you need
|
||||||
|
`wxMSW-3.1.1_vc141_Dev.7z` and `wxMSW-3.1.1_vc141_ReleaseDLL.7z`.
|
||||||
|
|
||||||
|
All binaries are available at:
|
||||||
|
|
||||||
|
https://github.com/wxWidgets/wxWidgets/releases/v3.1.1
|
||||||
|
|
||||||
|
Once you have the files you need, unzip all of them into the same directory, for
|
||||||
|
example `c:\wx\3.1.1`. You should have only include and lib subdirectories under
|
||||||
|
it, nothing else. To avoid hard-coding this path into your projects, define
|
||||||
|
`wxwin` environment variable containing it: although it's a little known fact,
|
||||||
|
all versions of MSVC support environment variable expansion in the C++ projects
|
||||||
|
(but not, unfortunately, in the solution files).
|
||||||
|
|
||||||
|
Using Binaries with Visual Studio
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Next step is to set up your project to use these files. You need to do the
|
||||||
|
following:
|
||||||
|
|
||||||
|
* In the compiler options, i.e. "C/C++" properties:
|
||||||
|
* Add `$(wxwin)/include/msvc;$(wxwin)/include` to the "Additional Include
|
||||||
|
Directories". Notice that the order is important here, putting the
|
||||||
|
MSVC-specific directory first ensures that you use `wx/setup.h`
|
||||||
|
automatically linking in wxWidgets libraries.
|
||||||
|
* Add `WXUSINGDLL` and `wxMSVC_VERSION_AUTO` to the list of defined
|
||||||
|
symbols in "Preprocessor Definitions". The first should be
|
||||||
|
self-explanatory (we only provide DLLs, not static libraries) while the
|
||||||
|
second one is necessary to use the libraries from e.g. `lib\vc100_dll`
|
||||||
|
directory and not the default `lib\vc_dll`.
|
||||||
|
* Also check that `_UNICODE` and `UNICODE` symbols are defined in the same
|
||||||
|
"Preprocessor Definitions" section. This should already be the case for
|
||||||
|
the newly created projects but it might be necessary to add them if
|
||||||
|
you're upgrading an existing one.
|
||||||
|
* Check that you use "Multi-threaded \[Debug\] DLL" in the "Run-time
|
||||||
|
library" option under "Code Generation" to ensure that your build uses
|
||||||
|
the same CRT version as our binaries.
|
||||||
|
* In the linker options you only need to add `$(wxwin)\lib\vc141_dll` (with
|
||||||
|
the compiler-version-dependent suffix, of course) to "Additional Library
|
||||||
|
Directories" under "Linker\\General" in the options. Thanks to the use of
|
||||||
|
MSVC-specific `setup.h` you don't need to list wxWidgets libraries manually,
|
||||||
|
i.e. you do **not** need to put anything in the list of "Additional
|
||||||
|
Dependencies".
|
||||||
|
|
||||||
|
Now you should be able to build your project successfully, both in "Debug" and
|
||||||
|
"Release" configurations. With MSVS 10 or newer it can also be done from the
|
||||||
|
command line using `msbuild.exe`. Of course, to run the generated executable
|
||||||
|
you will need to either add the directory containing wxWidgets DLLs to your PATH
|
||||||
|
or copy the DLL files to a directory already on it. Finally, if you want to
|
||||||
|
distribute the binaries created using these options, you will need to install
|
||||||
|
Microsoft Visual C++ run-time DLLs. Again, MSVC 10 or newer has an advantage
|
||||||
|
here as you can simply copy `msvcp100.dll` and `msvcr100.dll` as any other DLL,
|
||||||
|
while you need to install specially for the previous compiler versions that
|
||||||
|
use WinSxS ("side-by-side") for them.
|
@@ -1,4 +1,4 @@
|
|||||||
Building wxGTK port with Win32 GDK backend
|
Building wxGTK port with Win32 GDK backend {#plat_msw_gtk}
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
|
GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
|
||||||
@@ -11,14 +11,15 @@ These notes don't consider building wxGTK with X11 backend under Windows.
|
|||||||
Building steps:
|
Building steps:
|
||||||
|
|
||||||
1. wxGTK/Win32 build is similar to wxMSW one and you should have configured
|
1. wxGTK/Win32 build is similar to wxMSW one and you should have configured
|
||||||
and be able to build wxWidgets as described in docs/msw/install.txt
|
and be able to build wxWidgets as described in @ref plat_msw_install
|
||||||
|
|
||||||
2. wxGTK/Win32 is disabled by default in wxWidgets, you need to enable it
|
2. wxGTK/Win32 is disabled by default in wxWidgets, you need to enable it
|
||||||
in bakefiles manually. Apply following patch manually or using Cygwin:
|
in bakefiles manually. Apply following patch manually or using Cygwin:
|
||||||
|
|
||||||
patch -p0 < docs/msw/gtkfix.patch
|
patch -p0 < docs/msw/gtkfix.patch
|
||||||
|
|
||||||
Regenerate required make/project files:
|
Regenerate required make/project files:
|
||||||
|
|
||||||
cd build\bakefiles
|
cd build\bakefiles
|
||||||
bakefile_gen
|
bakefile_gen
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ in the C:\gtk directory.
|
|||||||
4. Building
|
4. Building
|
||||||
|
|
||||||
4.1 If you are using Visual C++ project files you need to setup GTK+ 2 include directories
|
4.1 If you are using Visual C++ project files you need to setup GTK+ 2 include directories
|
||||||
|
|
||||||
C:\gtk\lib\include\gtk-2.0
|
C:\gtk\lib\include\gtk-2.0
|
||||||
C:\gtk\lib\include\glib-2.0
|
C:\gtk\lib\include\glib-2.0
|
||||||
C:\gtk\lib\include\cairo
|
C:\gtk\lib\include\cairo
|
||||||
@@ -44,7 +46,7 @@ and library directory
|
|||||||
|
|
||||||
C:\gtk\lib\
|
C:\gtk\lib\
|
||||||
|
|
||||||
See http://msdn.microsoft.com/en-us/library/t9az1d21(v=vs.90).aspx
|
See http://msdn.microsoft.com/en-us/library/t9az1d21(v=vs.90).aspx
|
||||||
|
|
||||||
Open solution file in build\msw directory, select "GTK+ Debug" solution
|
Open solution file in build\msw directory, select "GTK+ Debug" solution
|
||||||
configuration and build the solution. To be sure that everything is as expected
|
configuration and build the solution. To be sure that everything is as expected
|
@@ -1,37 +1,26 @@
|
|||||||
Installing wxWidgets for Windows
|
Installing wxWidgets for Windows {#plat_msw_install}
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
This is wxWidgets for Microsoft Windows (XP, Vista, 7, 8, 10, etc)
|
This is wxWidgets for Microsoft Windows (XP, Vista, 7, 8, 10, etc)
|
||||||
including both 32 bit and 64 bit versions.
|
including both 32 bit and 64 bit versions.
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
Table of Contents:
|
Installation {#msw_install}
|
||||||
- Installation
|
|
||||||
- Building wxWidgets
|
|
||||||
- Configuring the Build
|
|
||||||
- Building Applications Using wxWidgets
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
|
||||||
============
|
============
|
||||||
|
|
||||||
If you are using one of the supported compilers, you can download the
|
If you are using one of the supported compilers, you can use
|
||||||
pre-built in binaries from
|
[pre-built binaries](@ref plat_msw_binaries).
|
||||||
|
|
||||||
https://github.com/wxWidgets/wxWidgets/releases/v3.1.1
|
|
||||||
|
|
||||||
In this case, just uncompress the binaries archive under any directory
|
In this case, just uncompress the binaries archive under any directory
|
||||||
and skip to "Building Applications Using wxWidgets" part.
|
and skip to [Building Applications Using wxWidgets](#msw_build_apps) part.
|
||||||
|
|
||||||
Otherwise, or if you want to build a configuration of the library
|
Otherwise, or if you want to build a configuration of the library
|
||||||
different from the default one, you need to build the library from
|
different from the default one, you need to build the library from
|
||||||
sources before using it.
|
sources before using it.
|
||||||
|
|
||||||
If you use CMake, please see
|
If you use CMake, please see @ref overview_cmake for
|
||||||
|
building wxWidgets using it.
|
||||||
https://docs.wxwidgets.org/trunk/overview_cmake.html
|
|
||||||
|
|
||||||
for building wxWidgets using it.
|
|
||||||
|
|
||||||
The first step, which you may have already performed, unless you are
|
The first step, which you may have already performed, unless you are
|
||||||
reading this file online, is to download the source archive and
|
reading this file online, is to download the source archive and
|
||||||
@@ -46,22 +35,22 @@ actually required, this makes using the library more convenient and
|
|||||||
this environment variable is used in the examples below.
|
this environment variable is used in the examples below.
|
||||||
|
|
||||||
NB: If you checked your sources from version control repository and
|
NB: If you checked your sources from version control repository and
|
||||||
didn't obtain them from a release file, you also need to copy
|
didn't obtain them from a release file, you also need to copy
|
||||||
include/wx/msw/setup0.h to include/wx/msw/setup.h and to remember
|
`include/wx/msw/setup0.h` to `include/wx/msw/setup.h` and to remember
|
||||||
to update the latter whenever the former changes, otherwise you
|
to update the latter whenever the former changes, otherwise you
|
||||||
will get compilation errors if any new symbols are added to
|
will get compilation errors if any new symbols are added to
|
||||||
setup0.h file in the repository.
|
setup0.h file in the repository.
|
||||||
|
|
||||||
If you have no intention of modifying setup.h, you may avoid this
|
If you have no intention of modifying setup.h, you may avoid this
|
||||||
problem by creating a symbolic link to setup0.h instead of making
|
problem by creating a symbolic link to setup0.h instead of making
|
||||||
a copy of it using mklink, from an admin command prompt:
|
a copy of it using mklink, from an admin command prompt:
|
||||||
|
|
||||||
cd %WXWIN%\include\wx\msw\
|
cd %WXWIN%\include\wx\msw\
|
||||||
mklink setup.h setup0.h
|
mklink setup.h setup0.h
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Building wxWidgets
|
Building wxWidgets {#msw_build}
|
||||||
==================
|
==================
|
||||||
|
|
||||||
The following sections explain how to compile wxWidgets with each supported
|
The following sections explain how to compile wxWidgets with each supported
|
||||||
@@ -70,7 +59,7 @@ building your application using wxWidgets.
|
|||||||
|
|
||||||
All makefiles and project are located in build\msw directory.
|
All makefiles and project are located in build\msw directory.
|
||||||
|
|
||||||
Microsoft Visual C++ Compilation
|
Microsoft Visual C++ Compilation {#msw_build_msvs}
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
* From command line using the provided makefiles:
|
* From command line using the provided makefiles:
|
||||||
@@ -79,7 +68,7 @@ Microsoft Visual C++ Compilation
|
|||||||
must have been installed to the "Start" menu or the "Start" screen
|
must have been installed to the "Start" menu or the "Start" screen
|
||||||
by MSVS installation.
|
by MSVS installation.
|
||||||
|
|
||||||
1. Change directory to %WXWIN%\build\msw and type
|
1. Change directory to \%WXWIN\%\build\msw and type
|
||||||
|
|
||||||
> nmake /f makefile.vc
|
> nmake /f makefile.vc
|
||||||
|
|
||||||
@@ -99,7 +88,7 @@ Microsoft Visual C++ Compilation
|
|||||||
See "Configuring the Build" for more information about the
|
See "Configuring the Build" for more information about the
|
||||||
additional parameters that can be specified on the command line.
|
additional parameters that can be specified on the command line.
|
||||||
|
|
||||||
2. To verify your build, change the directory to %WXWIN%\samples\minimal and
|
2. To verify your build, change the directory to \%WXWIN\%\samples\minimal and
|
||||||
run the same nmake command (with the same parameters there), this
|
run the same nmake command (with the same parameters there), this
|
||||||
should create a working minimal wxWidgets sample.
|
should create a working minimal wxWidgets sample.
|
||||||
|
|
||||||
@@ -120,7 +109,7 @@ are not always built in the correct order, and this may result in link
|
|||||||
errors. Simply do the build again, up to 3 times, to fix this.
|
errors. Simply do the build again, up to 3 times, to fix this.
|
||||||
|
|
||||||
|
|
||||||
Special notes for Visual Studio 2010+:
|
### Special notes for Visual Studio 2010+
|
||||||
|
|
||||||
For Visual Studio 2010+ solutions it is possible to customize the build by
|
For Visual Studio 2010+ solutions it is possible to customize the build by
|
||||||
creating a wx_local.props file in the build\msw directory which is used, if it
|
creating a wx_local.props file in the build\msw directory which is used, if it
|
||||||
@@ -132,8 +121,8 @@ make the file is to copy wx_setup.props to wx_local.props and then edit local.
|
|||||||
For example, if you are building wxWidgets libraries using multiple versions
|
For example, if you are building wxWidgets libraries using multiple versions
|
||||||
of Visual Studio you could change wxCompilerPrefix to include the toolset:
|
of Visual Studio you could change wxCompilerPrefix to include the toolset:
|
||||||
|
|
||||||
- <wxCompilerPrefix>vc</wxCompilerPrefix>
|
- <wxCompilerPrefix>vc</wxCompilerPrefix>
|
||||||
+ <wxCompilerPrefix>vc$(PlatformToolsetVersion)</wxCompilerPrefix>
|
+ <wxCompilerPrefix>vc$(PlatformToolsetVersion)</wxCompilerPrefix>
|
||||||
|
|
||||||
Following that example if you are using Visual Studio 2013 and open
|
Following that example if you are using Visual Studio 2013 and open
|
||||||
wx_vc12.sln it will build using the "vc120" prefix for the build directories
|
wx_vc12.sln it will build using the "vc120" prefix for the build directories
|
||||||
@@ -147,28 +136,31 @@ updated with it. For example the version information in wx_setup.props could
|
|||||||
change and the information in your wx_local.props would be outdated. It is
|
change and the information in your wx_local.props would be outdated. It is
|
||||||
your responsibility to monitor for such situations.
|
your responsibility to monitor for such situations.
|
||||||
|
|
||||||
Improve debugging for Visual Studio 2012+:
|
### Improve debugging for Visual Studio 2012+
|
||||||
|
|
||||||
Debug visualizers for Visual Studio 2012+ are provided which makes inspecting
|
Debug visualizers for Visual Studio 2012+ are provided which makes inspecting
|
||||||
various wxWidgets classes easier to view while debugging. To use them:
|
various wxWidgets classes easier to view while debugging. To use them:
|
||||||
|
|
||||||
1. Open the folder %WXWIN%\misc\msvc
|
1. Open the folder \%WXWIN\%\misc\msvc
|
||||||
2. Open the folder %USERPROFILE%\My Documents\Visual Studio 2012\Visualizers\
|
2. Open the folder \%USERPROFILE\%\My Documents\Visual Studio 2012\Visualizers\
|
||||||
(or the corresponding location for newer versions, e.g. ...2013\Visualizers)
|
(or the corresponding location for newer versions, e.g. ...2013\Visualizers)
|
||||||
3. Copy wxWidgets.natvis and autoexp.inc
|
3. Copy wxWidgets.natvis and autoexp.inc
|
||||||
4. For Visual Studio 2013+ additionally copy wxWidgets.2013.natvis
|
4. For Visual Studio 2013+ additionally copy wxWidgets.2013.natvis
|
||||||
|
|
||||||
|
|
||||||
Cygwin/MinGW Compilation
|
Cygwin/MinGW Compilation {#msw_build_cygwin}
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
wxWidgets supports Cygwin, MinGW, MinGW-w64 and TDM-GCC tool chains under
|
wxWidgets supports Cygwin, MinGW, MinGW-w64 and TDM-GCC tool chains under
|
||||||
Windows. They can be downloaded from:
|
Windows. They can be downloaded from:
|
||||||
|
|
||||||
http://www.cygwin.com/
|
http://www.cygwin.com/
|
||||||
http://www.mingw.org/
|
|
||||||
http://mingw-w64.sourceforge.net/
|
http://www.mingw.org/
|
||||||
http://tdm-gcc.tdragon.net/
|
|
||||||
|
http://mingw-w64.sourceforge.net/
|
||||||
|
|
||||||
|
http://tdm-gcc.tdragon.net/
|
||||||
|
|
||||||
respectively. Please retrieve and install the latest version of your preferred
|
respectively. Please retrieve and install the latest version of your preferred
|
||||||
tool chain by following the instructions provided by these packages. Notice
|
tool chain by following the instructions provided by these packages. Notice
|
||||||
@@ -189,7 +181,7 @@ All of these tool chains can be used either with Unix-like configure+make build
|
|||||||
process (preferred) or with the provided makefile.gcc makefiles without using
|
process (preferred) or with the provided makefile.gcc makefiles without using
|
||||||
configure:
|
configure:
|
||||||
|
|
||||||
* Using configure
|
### Using configure
|
||||||
|
|
||||||
This method works in exactly the same way as under Unix systems,
|
This method works in exactly the same way as under Unix systems,
|
||||||
including OS X, and requires a Unix-like environment to work, i.e.
|
including OS X, and requires a Unix-like environment to work, i.e.
|
||||||
@@ -231,7 +223,7 @@ either MSYS or Cygwin.
|
|||||||
so this step can usually be omitted.
|
so this step can usually be omitted.
|
||||||
|
|
||||||
|
|
||||||
* Using plain makefiles:
|
### Using plain makefiles:
|
||||||
|
|
||||||
NOTE: The makefile.gcc makefiles are for compilation under MinGW using
|
NOTE: The makefile.gcc makefiles are for compilation under MinGW using
|
||||||
Windows command interpreter (command.com/cmd.exe), they won't work
|
Windows command interpreter (command.com/cmd.exe), they won't work
|
||||||
@@ -240,7 +232,7 @@ NOTE: The makefile.gcc makefiles are for compilation under MinGW using
|
|||||||
|
|
||||||
0. Open DOS command line window (cmd.exe, *not* Bash sh.exe).
|
0. Open DOS command line window (cmd.exe, *not* Bash sh.exe).
|
||||||
|
|
||||||
1. Change directory to %WXWIN%\build\msw and type
|
1. Change directory to \%WXWIN\%\build\msw and type
|
||||||
|
|
||||||
> mingw32-make -f makefile.gcc
|
> mingw32-make -f makefile.gcc
|
||||||
|
|
||||||
@@ -263,7 +255,7 @@ NOTE: The makefile.gcc makefiles are for compilation under MinGW using
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Borland C++ Compilation
|
Borland C++ Compilation {#msw_build_borland}
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
WARNING: Borland instructions are out of date, please send us your
|
WARNING: Borland instructions are out of date, please send us your
|
||||||
@@ -278,7 +270,7 @@ debugger is very good. To avoid linker errors you will need to add
|
|||||||
-DSHARED=1 to the makefile line for the library
|
-DSHARED=1 to the makefile line for the library
|
||||||
|
|
||||||
The version 5.6 included in Borland C++ Builder 2006 works as well after the
|
The version 5.6 included in Borland C++ Builder 2006 works as well after the
|
||||||
following small change: please remove the test for __WINDOWS__ from line 88
|
following small change: please remove the test for `__WINDOWS__` from line 88
|
||||||
of the file BCCDIR\include\stl\_threads.h.
|
of the file BCCDIR\include\stl\_threads.h.
|
||||||
|
|
||||||
Compiling using the makefiles:
|
Compiling using the makefiles:
|
||||||
@@ -302,7 +294,7 @@ debug mode, edit makefile.bcc and change /aa to /Tpe in link commands.
|
|||||||
Using the Debugger and IDE in BDS or Turbo Explorer
|
Using the Debugger and IDE in BDS or Turbo Explorer
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
Doubleclick / open %WXWIN%\samples\minimal\borland.bdsproj. The current version
|
Doubleclick / open \%WXWIN\%\samples\minimal\borland.bdsproj. The current version
|
||||||
is to be used with a dynamic build of wxWidgets-made by running
|
is to be used with a dynamic build of wxWidgets-made by running
|
||||||
make -f Makefile.bcc -DBUILD=debug -DSHARED=1
|
make -f Makefile.bcc -DBUILD=debug -DSHARED=1
|
||||||
in wxWidgets\build\msw. You also need the wxWidgets\lib\bcc_dll
|
in wxWidgets\build\msw. You also need the wxWidgets\lib\bcc_dll
|
||||||
@@ -324,16 +316,16 @@ Compiling using the IDE files for Borland C++ 5.0 and using CBuilder IDE
|
|||||||
In all of your wxWidgets applications, your source code should include
|
In all of your wxWidgets applications, your source code should include
|
||||||
the following preprocessor directive:
|
the following preprocessor directive:
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(check the samples -- e.g., \wx2\samples\minimal\minimal.cpp -- for
|
(check the samples -- e.g., \wx2\samples\minimal\minimal.cpp -- for
|
||||||
more details)
|
more details)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Configuring the Build
|
Configuring the Build {#msw_build_config}
|
||||||
================================================================
|
================================================================
|
||||||
|
|
||||||
NOTE: If you use configure to build the library with Cygwin/MinGW, the
|
NOTE: If you use configure to build the library with Cygwin/MinGW, the
|
||||||
@@ -344,7 +336,7 @@ Library configuration
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
While it is never necessary to do it, you may want to change some of
|
While it is never necessary to do it, you may want to change some of
|
||||||
the options in the %WXWIN%\include\wx\msw\setup.h file before building
|
the options in the \%WXWIN\%\\include\\wx\\msw\\setup.h file before building
|
||||||
wxWidgets. This file is heavily commented, please read it and enable or disable
|
wxWidgets. This file is heavily commented, please read it and enable or disable
|
||||||
the features you would like to compile wxWidgets with[out].
|
the features you would like to compile wxWidgets with[out].
|
||||||
|
|
||||||
@@ -381,17 +373,20 @@ depending on the compiler used.
|
|||||||
|
|
||||||
The full list of the build settings follows:
|
The full list of the build settings follows:
|
||||||
|
|
||||||
BUILD=release
|
* BUILD=release
|
||||||
|
|
||||||
Builds release version of the library. It differs from default 'debug' in
|
Builds release version of the library. It differs from default 'debug' in
|
||||||
lack of appended 'd' in name of library and uses the release CRT libraries
|
lack of appended 'd' in name of library and uses the release CRT libraries
|
||||||
instead of debug ones. Notice that even release builds do include debug
|
instead of debug ones. Notice that even release builds do include debug
|
||||||
information by default, see DEBUG_FLAG for more information about it.
|
information by default, see DEBUG_FLAG for more information about it.
|
||||||
|
|
||||||
SHARED=1
|
* SHARED=1
|
||||||
|
|
||||||
Build shared libraries (DLLs). By default, DLLs are not built
|
Build shared libraries (DLLs). By default, DLLs are not built
|
||||||
(SHARED=0).
|
(SHARED=0).
|
||||||
|
|
||||||
UNICODE=0
|
* UNICODE=0
|
||||||
|
|
||||||
To completely disable Unicode support (default is UNICODE=1). It should not
|
To completely disable Unicode support (default is UNICODE=1). It should not
|
||||||
be necessary to do this.
|
be necessary to do this.
|
||||||
|
|
||||||
@@ -399,54 +394,62 @@ UNICODE=0
|
|||||||
Unicode build) and the directory where the library and setup.h are stored
|
Unicode build) and the directory where the library and setup.h are stored
|
||||||
(ditto).
|
(ditto).
|
||||||
|
|
||||||
WXUNIV=1
|
* WXUNIV=1
|
||||||
|
|
||||||
Build wxUniversal instead of native wxMSW
|
Build wxUniversal instead of native wxMSW
|
||||||
|
|
||||||
MONOLITHIC=1
|
* MONOLITHIC=1
|
||||||
|
|
||||||
Starting with version 2.5.1, wxWidgets has the ability to be built as
|
Starting with version 2.5.1, wxWidgets has the ability to be built as
|
||||||
several smaller libraries instead of single big one as used to be the case
|
several smaller libraries instead of single big one as used to be the case
|
||||||
in 2.4 and older versions. This is called "multilib build" and is the
|
in 2.4 and older versions. This is called "multilib build" and is the
|
||||||
default behaviour of makefiles. You can still build single library
|
default behaviour of makefiles. You can still build single library
|
||||||
("monolithic build") by setting MONOLITHIC variable to 1.
|
("monolithic build") by setting MONOLITHIC variable to 1.
|
||||||
|
|
||||||
USE_GUI=0
|
* USE_GUI=0
|
||||||
|
|
||||||
Disable building GUI parts of the library, build only wxBase components used
|
Disable building GUI parts of the library, build only wxBase components used
|
||||||
by console applications. Note that if you leave USE_GUI=1 then both wxBase
|
by console applications. Note that if you leave USE_GUI=1 then both wxBase
|
||||||
and GUI libraries are built.
|
and GUI libraries are built.
|
||||||
|
|
||||||
USE_$(LIBRARY)=0
|
* USE_$(LIBRARY)=0
|
||||||
|
|
||||||
Do not build the corresponding library (all libraries are built by
|
Do not build the corresponding library (all libraries are built by
|
||||||
default). Library which can be disabled in this way are: AUI, HTML,
|
default). Library which can be disabled in this way are: AUI, HTML,
|
||||||
MEDIA, GL (the option name is USE_OPENGL for this one), PROPGRID,
|
MEDIA, GL (the option name is USE_OPENGL for this one), PROPGRID,
|
||||||
QA, RIBBON, RICHTEXT, STC, WEBVIEW, XRC.
|
QA, RIBBON, RICHTEXT, STC, WEBVIEW, XRC.
|
||||||
|
|
||||||
RUNTIME_LIBS=static
|
* RUNTIME_LIBS=static
|
||||||
|
|
||||||
Links static version of C and C++ runtime libraries into the executable, so
|
Links static version of C and C++ runtime libraries into the executable, so
|
||||||
that the program does not depend on DLLs provided with the compiler (e.g.
|
that the program does not depend on DLLs provided with the compiler (e.g.
|
||||||
Visual C++'s msvcrt.dll or Borland's cc3250mt.dll).
|
Visual C++'s msvcrt.dll or Borland's cc3250mt.dll).
|
||||||
Caution: Do not use static runtime libraries when building DLL (SHARED=1)!
|
Caution: Do not use static runtime libraries when building DLL (SHARED=1)!
|
||||||
|
|
||||||
DEBUG_FLAG=0
|
* DEBUG_FLAG=0
|
||||||
DEBUG_FLAG=1
|
* DEBUG_FLAG=1
|
||||||
DEBUG_FLAG=2
|
* DEBUG_FLAG=2
|
||||||
|
|
||||||
Specifies the level of debug support in wxWidgets. Notice that
|
Specifies the level of debug support in wxWidgets. Notice that
|
||||||
this is independent from both BUILD and DEBUG_INFO options. By default
|
this is independent from both BUILD and DEBUG_INFO options. By default
|
||||||
always set to 1 meaning that debug support is enabled: asserts are compiled
|
always set to 1 meaning that debug support is enabled: asserts are compiled
|
||||||
into the code (they are inactive by default in release builds of the
|
into the code (they are inactive by default in release builds of the
|
||||||
application but can be enabled), wxLogDebug() and wxLogTrace() are available
|
application but can be enabled), wxLogDebug() and wxLogTrace() are available
|
||||||
and __WXDEBUG__ is defined. Setting it to 0 completely disables all
|
and `__WXDEBUG__` is defined. Setting it to 0 completely disables all
|
||||||
debugging code in wxWidgets while setting it to 2 enables even the time
|
debugging code in wxWidgets while setting it to 2 enables even the time
|
||||||
consuming assertions and checks which are deemed to be unsuitable for
|
consuming assertions and checks which are deemed to be unsuitable for
|
||||||
production environment.
|
production environment.
|
||||||
|
|
||||||
DEBUG_INFO=0
|
* DEBUG_INFO=0
|
||||||
DEBUG_INFO=1
|
* DEBUG_INFO=1
|
||||||
|
|
||||||
This option affects whether debugging information is generated. If
|
This option affects whether debugging information is generated. If
|
||||||
omitted or set to 'default' its value is determined the value of
|
omitted or set to 'default' its value is determined the value of
|
||||||
the BUILD option.
|
the BUILD option.
|
||||||
|
|
||||||
DEBUG_RUNTIME_LIBS=0
|
* DEBUG_RUNTIME_LIBS=0
|
||||||
DEBUG_RUNTIME_LIBS=1
|
* DEBUG_RUNTIME_LIBS=1
|
||||||
|
|
||||||
(VC++ only.) If set to 1, msvcrtd.dll is used, if to 0, msvcrt.dll
|
(VC++ only.) If set to 1, msvcrtd.dll is used, if to 0, msvcrt.dll
|
||||||
is used. By default msvcrtd.dll is used only if the executable
|
is used. By default msvcrtd.dll is used only if the executable
|
||||||
contains debug info and msvcrt.dll if it doesn't. It is sometimes
|
contains debug info and msvcrt.dll if it doesn't. It is sometimes
|
||||||
@@ -455,11 +458,13 @@ DEBUG_RUNTIME_LIBS=1
|
|||||||
usable .pdb files with debug information) and this setting makes it
|
usable .pdb files with debug information) and this setting makes it
|
||||||
possible.
|
possible.
|
||||||
|
|
||||||
TARGET_CPU=X64|ARM64|IA64
|
* TARGET_CPU=X64|ARM64|IA64
|
||||||
|
|
||||||
(VC++ only.) Set this variable to build for x86_64 systems. If unset, x86
|
(VC++ only.) Set this variable to build for x86_64 systems. If unset, x86
|
||||||
build is performed.
|
build is performed.
|
||||||
|
|
||||||
VENDOR=<your company name>
|
* VENDOR=\<your company name\>
|
||||||
|
|
||||||
Set this to a short string identifying your company if you are planning to
|
Set this to a short string identifying your company if you are planning to
|
||||||
distribute wxWidgets DLLs with your application. Default value is 'custom'.
|
distribute wxWidgets DLLs with your application. Default value is 'custom'.
|
||||||
This string is included as part of DLL name. wxWidgets DLLs contain compiler
|
This string is included as part of DLL name. wxWidgets DLLs contain compiler
|
||||||
@@ -468,72 +473,74 @@ VENDOR=<your company name>
|
|||||||
default settings. If you set VENDOR=mycorp, the name will change to
|
default settings. If you set VENDOR=mycorp, the name will change to
|
||||||
wxmsw311u_core_vc_mycorp.dll.
|
wxmsw311u_core_vc_mycorp.dll.
|
||||||
|
|
||||||
CFG=<configuration name>
|
* CFG=\<configuration name\>
|
||||||
|
|
||||||
Sets configuration name so that you can have multiple wxWidgets builds with
|
Sets configuration name so that you can have multiple wxWidgets builds with
|
||||||
different setup.h settings coexisting in same tree. The value of
|
different setup.h settings coexisting in same tree. The value of
|
||||||
this option is appended to the build directories names. This is
|
this option is appended to the build directories names. This is
|
||||||
useful for building the library in some non-default configuration,
|
useful for building the library in some non-default configuration,
|
||||||
e.g. you could change wxUSE_STL to 1 in %WXWIN%\include\wx\msw\setup.h and
|
e.g. you could change wxUSE_STL to 1 in \%WXWIN\%\include\wx\msw\setup.h and
|
||||||
then build with "CFG=-stl". Alternatively, you could build with e.g.
|
then build with "CFG=-stl". Alternatively, you could build with e.g.
|
||||||
"RUNTIME_LIBS=static CFG=-mt" when using MSVC.
|
"RUNTIME_LIBS=static CFG=-mt" when using MSVC.
|
||||||
|
|
||||||
COMPILER_PREFIX=<string>
|
* COMPILER_PREFIX=\<string\>
|
||||||
|
|
||||||
If you build with multiple versions of the same compiler, you can put
|
If you build with multiple versions of the same compiler, you can put
|
||||||
their outputs into directories like "vc6_lib", "vc8_lib" etc. instead of
|
their outputs into directories like "vc6_lib", "vc8_lib" etc. instead of
|
||||||
"vc_lib" by setting this variable to e.g. "vc6". This is merely a
|
"vc_lib" by setting this variable to e.g. "vc6". This is merely a
|
||||||
convenience variable, you can achieve the same effect (but different
|
convenience variable, you can achieve the same effect (but different
|
||||||
directory names) with the CFG option.
|
directory names) with the CFG option.
|
||||||
|
|
||||||
CFLAGS
|
* CFLAGS
|
||||||
CXXFLAGS
|
* CXXFLAGS
|
||||||
CPPFLAGS
|
* CPPFLAGS
|
||||||
LDFLAGS
|
* LDFLAGS
|
||||||
|
|
||||||
Additional flags to be used with C compiler, C++ compiler, C
|
Additional flags to be used with C compiler, C++ compiler, C
|
||||||
preprocessor (used for both C and C++ compilation) and linker,
|
preprocessor (used for both C and C++ compilation) and linker,
|
||||||
respectively.
|
respectively.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Building Applications Using wxWidgets
|
Building Applications Using wxWidgets {#msw_build_apps}
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
If you want to use CMake for building your project, please see
|
If you want to use CMake for building your project, please see
|
||||||
|
@ref overview_cmake.
|
||||||
https://docs.wxwidgets.org/trunk/overview_cmake.html#cmake_apps
|
|
||||||
|
|
||||||
Otherwise follow the instructions below for "manual" setup of your project.
|
Otherwise follow the instructions below for "manual" setup of your project.
|
||||||
|
|
||||||
We suppose that wxWidgets sources are under the directory $WXWIN (notice that
|
We suppose that wxWidgets sources are under the directory $WXWIN (notice that
|
||||||
different tool chains refer to environment variables such as WXWIN in
|
different tool chains refer to environment variables such as WXWIN in
|
||||||
different ways, e.g. MSVC users should use $(WXWIN) instead of just
|
different ways, e.g. MSVC users should use $(WXWIN) instead of just
|
||||||
$WXWIN). And we will use <wx-lib-dir> as a shortcut for the subdirectory of
|
$WXWIN). And we will use \<wx-lib-dir\> as a shortcut for the subdirectory of
|
||||||
$WXWIN\lib which is composed from several parts separated by underscore:
|
$WXWIN\lib which is composed from several parts separated by underscore:
|
||||||
first, a compiler-specific prefix (e.g. "vc" for MSVC, "gcc" for g++ or the
|
first, a compiler-specific prefix (e.g. "vc" for MSVC, "gcc" for g++ or the
|
||||||
value of COMPILER_PREFIX if you set it explicitly), then optional "x64" if
|
value of COMPILER_PREFIX if you set it explicitly), then optional "x64" if
|
||||||
building in 64 bits and finally either "lib" or "dll" depending on whether
|
building in 64 bits and finally either "lib" or "dll" depending on whether
|
||||||
static or dynamic wx libraries are being used.
|
static or dynamic wx libraries are being used.
|
||||||
|
|
||||||
For example, WXWIN could be "c:\wxWidgets\3.4.5" and <wx-lib-dir> could be
|
For example, WXWIN could be "c:\wxWidgets\3.4.5" and \<wx-lib-dir\> could be
|
||||||
"c:\wxWidgets\3.4.5\lib\vc_x64_lib" for 64-bit static libraries built with
|
"c:\wxWidgets\3.4.5\lib\vc_x64_lib" for 64-bit static libraries built with
|
||||||
MSVC.
|
MSVC.
|
||||||
|
|
||||||
Here is what you need to do:
|
Here is what you need to do:
|
||||||
|
|
||||||
* Add $WXWIN\include to the
|
* Add $WXWIN\\include to the
|
||||||
- compiler
|
- compiler
|
||||||
- resource compiler
|
- resource compiler
|
||||||
include paths.
|
include paths.
|
||||||
* If using MSVC, prepend $WXWIN\include\msvc to the include paths too.
|
* If using MSVC, prepend $WXWIN\include\msvc to the include paths too.
|
||||||
Otherwise, append <wx-lib-dir>\mswu[d] to the include paths, where "d" should
|
Otherwise, append \<wx-lib-dir\>\mswu[d] to the include paths, where "d" should
|
||||||
be used for debug builds only.
|
be used for debug builds only.
|
||||||
* Define the following symbols for the preprocessor:
|
* Define the following symbols for the preprocessor:
|
||||||
- __WXMSW__ to ensure you use the correct wxWidgets port.
|
- `__WXMSW__` to ensure you use the correct wxWidgets port.
|
||||||
- _UNICODE unless you want to use deprecated ANSI build of wxWidgets.
|
- _UNICODE unless you want to use deprecated ANSI build of wxWidgets.
|
||||||
- NDEBUG if you want to build in release mode, i.e. disable asserts.
|
- NDEBUG if you want to build in release mode, i.e. disable asserts.
|
||||||
- WXUSINGDLL if you are using DLL build of wxWidgets.
|
- WXUSINGDLL if you are using DLL build of wxWidgets.
|
||||||
* If using MSVC 7 only (i.e. not for later versions), also define
|
* If using MSVC 7 only (i.e. not for later versions), also define
|
||||||
wxUSE_RC_MANIFEST=1 and WX_CPU_X86.
|
wxUSE_RC_MANIFEST=1 and WX_CPU_X86.
|
||||||
* Add <wx-lib-dir> directory described above to the libraries path.
|
* Add \<wx-lib-dir\> directory described above to the libraries path.
|
||||||
|
|
||||||
When using MSVC, the libraries are linked automatically using "#pragma
|
When using MSVC, the libraries are linked automatically using "#pragma
|
||||||
comment(lib)" feature of this compiler. With all the other compilers you also
|
comment(lib)" feature of this compiler. With all the other compilers you also
|
||||||
@@ -554,3 +561,18 @@ using wxWidgets and always work, so in case of a problem, e.g. if the
|
|||||||
instructions here are out of date, you can always simply copy a makefile or
|
instructions here are out of date, you can always simply copy a makefile or
|
||||||
project file from $WXWIN\samples\minimal or some other sample and adapt it to
|
project file from $WXWIN\samples\minimal or some other sample and adapt it to
|
||||||
your application.
|
your application.
|
||||||
|
|
||||||
|
If you are not using Visual Studio 2010 or newer please see
|
||||||
|
@subpage plat_msw_winxp "Windows XP Support" to enable visual styles in your
|
||||||
|
application.
|
||||||
|
|
||||||
|
Advanced Library Configurations {#msw_advanced}
|
||||||
|
===============================
|
||||||
|
Build instructions to less common library configuartions using different UI
|
||||||
|
backends are avaiable here.
|
||||||
|
|
||||||
|
@subpage plat_msw_msys2 "Building with Win32 MSys2 backend"
|
||||||
|
|
||||||
|
@subpage plat_msw_msys2_gtk "Building with Win32 MSys2 GDK backend"
|
||||||
|
|
||||||
|
@subpage plat_msw_gtk "Building wxGTK port with Win32 GDK backend"
|
124
docs/msw/msys2-gtk.md
Normal file
124
docs/msw/msys2-gtk.md
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
Building wxGTK port with Win32 MSys2 GDK backend {#plat_msw_msys2_gtk}
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
|
||||||
|
It is a wrapper around Windows API.
|
||||||
|
|
||||||
|
These notes don't consider building wxGTK with X11 backend under Windows.
|
||||||
|
|
||||||
|
The MSys2 website is http://www.msys2.org/
|
||||||
|
|
||||||
|
These building steps are NOT the normal way to build MSys2 MinGW packages.
|
||||||
|
But, they are a way the wxWidgets developers can test that wxWidgets
|
||||||
|
can build the wxGTK/Win32 libraries under MSys2 MinGW.
|
||||||
|
|
||||||
|
For the MSys2 way please see
|
||||||
|
https://github.com/Alexpux/MINGW-packages and
|
||||||
|
https://github.com/msys2/msys2/wiki/Creating-packages
|
||||||
|
|
||||||
|
Building steps:
|
||||||
|
|
||||||
|
**Warning**: At the time these directions were written the GTK version 3
|
||||||
|
was NOT able to create wxGTK/Win32 libraries that were usable.
|
||||||
|
|
||||||
|
1. Install the mingw32 packages needed to build wxGTK/Win32 using the
|
||||||
|
configure/make build method.
|
||||||
|
From the MSys2 prompt or MSys2 MinGW prompt:
|
||||||
|
|
||||||
|
The 32 bit Mingw packages are prefixed with "mingw-w64-i686-";
|
||||||
|
Change the prefix to "mingw-w64-x86_64-" if you wish to do 64 bit.
|
||||||
|
|
||||||
|
pacman -S --needed --noconfirm make
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-libjpeg-turbo
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-libpng
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-libtiff
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-gcc
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-pkg-config
|
||||||
|
## gtk2 can take a long time to update/find fonts
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-gtk2
|
||||||
|
|
||||||
|
|
||||||
|
Packages that are needed but are normally installed already.
|
||||||
|
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-gcc-libs
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-expat
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-xz
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-zlib
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-gdk-pixbuf2
|
||||||
|
|
||||||
|
|
||||||
|
2. Build the wxGTK/Win32 static library
|
||||||
|
1. Open MSys2 MinGW Prompt
|
||||||
|
(These steps were tested on MinGW32; but, should work under MinGW64)
|
||||||
|
2. Use the cd command to change directory to the wxWidgets top folder.
|
||||||
|
|
||||||
|
3. Create the "build-gtk2-static" folder to build the static libraries
|
||||||
|
|
||||||
|
mkdir -p build-gtk2-static
|
||||||
|
|
||||||
|
4. Configure wxWidgets
|
||||||
|
Option "--disable-precomp-headers" is NOT needed.
|
||||||
|
It is being used to test for compile issues.
|
||||||
|
|
||||||
|
Remove configure option "--disable-wxdib" to set wxUSE_WXDIB to 1.
|
||||||
|
The directions docs/msw/gtk.txt results in wxUSE_WXDIB set to 1.
|
||||||
|
|
||||||
|
cd build-gtk2-static && \
|
||||||
|
../configure --with-gtk=2 \
|
||||||
|
--disable-wxdib \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-precomp-headers \
|
||||||
|
&& cd ..
|
||||||
|
|
||||||
|
5. clean the wxGTK static libraries
|
||||||
|
|
||||||
|
cd build-gtk2-static && make clean && cd ..
|
||||||
|
|
||||||
|
6. make the wxGTK static libraries
|
||||||
|
|
||||||
|
cd build-gtk2-static && make && cd ..
|
||||||
|
|
||||||
|
|
||||||
|
3. Build and run the minimal static sample
|
||||||
|
1. Clean the minimal sample
|
||||||
|
|
||||||
|
cd build-gtk2-static/samples/minimal && make clean && cd ../../..
|
||||||
|
|
||||||
|
2. Build the minimal sample
|
||||||
|
|
||||||
|
cd build-gtk2-static/samples/minimal && make && cd ../../..
|
||||||
|
|
||||||
|
3. Run the minimal sample
|
||||||
|
|
||||||
|
./build-gtk2-static/samples/minimal/minimal.exe
|
||||||
|
|
||||||
|
|
||||||
|
4. Build most of the static samples
|
||||||
|
1. Clean most of the static samples
|
||||||
|
|
||||||
|
cd build-gtk2-static/samples && make clean && cd ../..
|
||||||
|
|
||||||
|
2. Build most of the static samples
|
||||||
|
|
||||||
|
cd build-gtk2-static/samples && make && cd ../..
|
||||||
|
|
||||||
|
|
||||||
|
5. Run the drawing static sample
|
||||||
|
|
||||||
|
cd samples/drawing && ../../build-gtk2-static/samples/drawing/drawing.exe && cd ../..
|
||||||
|
|
||||||
|
6. Run the splash static sample
|
||||||
|
|
||||||
|
cd samples/splash && ../../build-gtk2-static/samples/splash/splash.exe && cd ../..
|
||||||
|
|
||||||
|
7. Run the widgets static sample
|
||||||
|
|
||||||
|
cd samples/widgets && ../../build-gtk2-static/samples/widgets/widgets.exe && cd ../..
|
||||||
|
|
||||||
|
8. Run the toolbar static sample
|
||||||
|
|
||||||
|
cd samples/toolbar && ../../build-gtk2-static/samples/toolbar/toolbar.exe && cd ../..
|
||||||
|
|
||||||
|
9. Run the image static sample
|
||||||
|
|
||||||
|
cd samples/image && ../../build-gtk2-static/samples/image/image.exe && cd ../..
|
@@ -1,111 +0,0 @@
|
|||||||
Building wxGTK port with Win32 MSys2 GDK backend
|
|
||||||
------------------------------------------------
|
|
||||||
|
|
||||||
GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
|
|
||||||
It is a wrapper around Windows API.
|
|
||||||
|
|
||||||
These notes don't consider building wxGTK with X11 backend under Windows.
|
|
||||||
|
|
||||||
The MSys2 website is http://www.msys2.org/
|
|
||||||
|
|
||||||
These building steps are NOT the normal way to build MSys2 MinGW packages.
|
|
||||||
But, they are a way the wxWidgets developers can test that wxWidgets
|
|
||||||
can build the wxGTK/Win32 libraries under MSys2 MinGW.
|
|
||||||
|
|
||||||
For the MSys2 way please see
|
|
||||||
https://github.com/Alexpux/MINGW-packages and
|
|
||||||
https://github.com/msys2/msys2/wiki/Creating-packages
|
|
||||||
|
|
||||||
Building steps:
|
|
||||||
|
|
||||||
#Note: The "#" is used in front of a comment to help the people who cut
|
|
||||||
# and paste these directions.
|
|
||||||
#Warning: At the time these directions were written the GTK version 3
|
|
||||||
# was NOT able to create wxGTK/Win32 libraries that were usable.
|
|
||||||
|
|
||||||
#1. Install the mingw32 packages needed to build wxGTK/Win32 using the
|
|
||||||
# configure/make build method.
|
|
||||||
# From the MSys2 prompt or MSys2 MinGW prompt:
|
|
||||||
|
|
||||||
# The 32 bit Mingw packages are prefixed with "mingw-w64-i686-";
|
|
||||||
# Change the prefix to "mingw-w64-x86_64-" if you wish to do 64 bit.
|
|
||||||
|
|
||||||
pacman -S --needed --noconfirm make
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-libjpeg-turbo
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-libpng
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-libtiff
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-gcc
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-pkg-config
|
|
||||||
## gtk2 can take a long time to update/find fonts
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-gtk2
|
|
||||||
|
|
||||||
|
|
||||||
# Packages that are needed but are normally installed already.
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-gcc-libs
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-expat
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-xz
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-zlib
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-gdk-pixbuf2
|
|
||||||
|
|
||||||
|
|
||||||
#2. Build the wxGTK/Win32 static library
|
|
||||||
#2a.Open MSys2 MinGW Prompt
|
|
||||||
# (These steps were tested on MinGW32; but, should work under MinGW64)
|
|
||||||
#2b.Use the cd command to change directory to the wxWidgets top folder.
|
|
||||||
|
|
||||||
|
|
||||||
#2c.Create the "build-gtk2-static" folder to build the static libraries
|
|
||||||
mkdir -p build-gtk2-static
|
|
||||||
|
|
||||||
#2d.Configure wxWidgets
|
|
||||||
# Option "--disable-precomp-headers" is NOT needed.
|
|
||||||
# It is being used to test for compile issues.
|
|
||||||
#
|
|
||||||
# Remove configure option "--disable-wxdib" to set wxUSE_WXDIB to 1.
|
|
||||||
# The directions docs/msw/gtk.txt results in wxUSE_WXDIB set to 1.
|
|
||||||
cd build-gtk2-static && \
|
|
||||||
../configure --with-gtk=2 \
|
|
||||||
--disable-wxdib \
|
|
||||||
--disable-shared \
|
|
||||||
--disable-precomp-headers \
|
|
||||||
&& cd ..
|
|
||||||
|
|
||||||
#2e.clean the wxGTK static libraries
|
|
||||||
cd build-gtk2-static && make clean && cd ..
|
|
||||||
|
|
||||||
#2f.make the wxGTK static libraries
|
|
||||||
cd build-gtk2-static && make && cd ..
|
|
||||||
|
|
||||||
|
|
||||||
#3 Build and run the minimal static sample
|
|
||||||
#3a.Clean the minimal sample
|
|
||||||
cd build-gtk2-static/samples/minimal && make clean && cd ../../..
|
|
||||||
|
|
||||||
#3b.Build the minimal sample
|
|
||||||
cd build-gtk2-static/samples/minimal && make && cd ../../..
|
|
||||||
|
|
||||||
#3c.Run the minimal sample
|
|
||||||
./build-gtk2-static/samples/minimal/minimal.exe
|
|
||||||
|
|
||||||
|
|
||||||
#4 Build most of the static samples
|
|
||||||
#4a.Clean most of the static samples
|
|
||||||
cd build-gtk2-static/samples && make clean && cd ../..
|
|
||||||
#4b.Build most of the static samples
|
|
||||||
cd build-gtk2-static/samples && make && cd ../..
|
|
||||||
|
|
||||||
|
|
||||||
#5 Run the drawing static sample
|
|
||||||
cd samples/drawing && ../../build-gtk2-static/samples/drawing/drawing.exe && cd ../..
|
|
||||||
|
|
||||||
#6 Run the splash static sample
|
|
||||||
cd samples/splash && ../../build-gtk2-static/samples/splash/splash.exe && cd ../..
|
|
||||||
|
|
||||||
#7 Run the widgets static sample
|
|
||||||
cd samples/widgets && ../../build-gtk2-static/samples/widgets/widgets.exe && cd ../..
|
|
||||||
|
|
||||||
#8 Run the toolbar static sample
|
|
||||||
cd samples/toolbar && ../../build-gtk2-static/samples/toolbar/toolbar.exe && cd ../..
|
|
||||||
|
|
||||||
#9 Run the image static sample
|
|
||||||
cd samples/image && ../../build-gtk2-static/samples/image/image.exe && cd ../..
|
|
101
docs/msw/msys2-msw.md
Normal file
101
docs/msw/msys2-msw.md
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
Building wxMSW port with Win32 MSys2 backend {#plat_msw_msys2}
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
The MSys2 website is http://www.msys2.org/
|
||||||
|
|
||||||
|
These building steps are NOT the normal way to build MSys2 MinGW packages.
|
||||||
|
But, they are a way the wxWidgets developers can test that wxWidgets
|
||||||
|
can build the wxMSW libraries under MSys2 MinGW.
|
||||||
|
|
||||||
|
For the MSys2 way please see https://github.com/Alexpux/MINGW-packages
|
||||||
|
|
||||||
|
Building steps:
|
||||||
|
|
||||||
|
1. Install the mingw32 packages needed to build wxMSW using the
|
||||||
|
configure/make build method.
|
||||||
|
From the MSys2 prompt or MSys2 MinGW prompt:
|
||||||
|
|
||||||
|
The 32 bit Mingw packages are prefixed with "mingw-w64-i686-";
|
||||||
|
Change the prefix to "mingw-w64-x86_64-" if you wish to do 64 bit.
|
||||||
|
|
||||||
|
pacman -S --needed --noconfirm make
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-libjpeg-turbo
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-libpng
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-libtiff
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-gcc
|
||||||
|
|
||||||
|
Packages that are needed but are normally installed already.
|
||||||
|
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-gcc-libs
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-expat
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-xz
|
||||||
|
pacman -S --needed --noconfirm mingw-w64-i686-zlib
|
||||||
|
|
||||||
|
|
||||||
|
2. Build the wxMSW static library
|
||||||
|
1. Open MSys2 MinGW Prompt
|
||||||
|
(These steps were tested on MinGW32; but, should work under MinGW64)
|
||||||
|
2. Use the cd command to change directory to the wxWidgets top folder.
|
||||||
|
|
||||||
|
3. Create the "build-msw-static" folder to build the static libraries
|
||||||
|
|
||||||
|
mkdir -p build-msw-static
|
||||||
|
|
||||||
|
4. Configure wxWidgets
|
||||||
|
|
||||||
|
Option "--disable-precomp-headers" is NOT needed.
|
||||||
|
I am doing it to check for compile issues;
|
||||||
|
And, I think my old 32 bit Windows machine
|
||||||
|
works best with it disabled.
|
||||||
|
|
||||||
|
cd build-msw-static && \
|
||||||
|
../configure --with-msw \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-precomp-headers \
|
||||||
|
&& cd ..
|
||||||
|
|
||||||
|
5. make the wxMSW static libraries
|
||||||
|
|
||||||
|
cd build-msw-static && make && cd ..
|
||||||
|
|
||||||
|
3. Build and run the minimal static sample
|
||||||
|
|
||||||
|
1. Clean the minimal sample
|
||||||
|
|
||||||
|
cd build-msw-static/samples/minimal && make clean && cd ../../..
|
||||||
|
|
||||||
|
2. Build the minimal sample
|
||||||
|
|
||||||
|
cd build-msw-static/samples/minimal && make && cd ../../..
|
||||||
|
|
||||||
|
3. Run the minimal sample
|
||||||
|
|
||||||
|
./build-msw-static/samples/minimal/minimal.exe
|
||||||
|
|
||||||
|
4. Clean the static samples
|
||||||
|
|
||||||
|
cd build-msw-static/samples && make clean && cd ../..
|
||||||
|
|
||||||
|
5. Build and run the typetest static sample to verify MIME database works
|
||||||
|
|
||||||
|
cd build-msw-static/samples/typetest && make && cd ../../..
|
||||||
|
./build-msw-static/samples/typetest/typetest.exe
|
||||||
|
|
||||||
|
6. Build and run the drawing static sample
|
||||||
|
|
||||||
|
cd build-msw-static/samples/drawing && make && cd ../../..
|
||||||
|
cd samples/drawing && ../../build-msw-static/samples/drawing/drawing.exe && cd ../..
|
||||||
|
|
||||||
|
7. Build and run the splash static sample
|
||||||
|
|
||||||
|
cd build-msw-static/samples/splash && make && cd ../../..
|
||||||
|
cd samples/splash && ../../build-msw-static/samples/splash/splash.exe && cd ../..
|
||||||
|
|
||||||
|
8. Build and run the widgets static sample
|
||||||
|
|
||||||
|
cd build-msw-static/samples/widgets && make && cd ../../..
|
||||||
|
cd samples/widgets && ../../build-msw-static/samples/widgets/widgets.exe && cd ../..
|
||||||
|
|
||||||
|
9. Build all the rest of the static samples
|
||||||
|
|
||||||
|
cd build-msw-static/samples && make && cd ../..
|
@@ -1,92 +0,0 @@
|
|||||||
Building wxMSW port with Win32 MSys2 backend
|
|
||||||
------------------------------------------------
|
|
||||||
|
|
||||||
The MSys2 website is http://www.msys2.org/
|
|
||||||
|
|
||||||
These building steps are NOT the normal way to build MSys2 MinGW packages.
|
|
||||||
But, they are a way the wxWidgets developers can test that wxWidgets
|
|
||||||
can build the wxMSW libraries under MSys2 MinGW.
|
|
||||||
|
|
||||||
For the MSys2 way please see https://github.com/Alexpux/MINGW-packages
|
|
||||||
|
|
||||||
Building steps:
|
|
||||||
|
|
||||||
#Note: The "#" is used in front of a comment to help the people who cut
|
|
||||||
# and paste these directions.
|
|
||||||
|
|
||||||
#1. Install the mingw32 packages needed to build wxMSW using the
|
|
||||||
# configure/make build method.
|
|
||||||
# From the MSys2 prompt or MSys2 MinGW prompt:
|
|
||||||
|
|
||||||
# The 32 bit Mingw packages are prefixed with "mingw-w64-i686-";
|
|
||||||
# Change the prefix to "mingw-w64-x86_64-" if you wish to do 64 bit.
|
|
||||||
|
|
||||||
pacman -S --needed --noconfirm make
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-libjpeg-turbo
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-libpng
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-libtiff
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-gcc
|
|
||||||
|
|
||||||
# Packages that are needed but are normally installed already.
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-gcc-libs
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-expat
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-xz
|
|
||||||
pacman -S --needed --noconfirm mingw-w64-i686-zlib
|
|
||||||
|
|
||||||
|
|
||||||
#2. Build the wxMSW static library
|
|
||||||
#2a.Open MSys2 MinGW Prompt
|
|
||||||
# (These steps were tested on MinGW32; but, should work under MinGW64)
|
|
||||||
#2b.Use the cd command to change directory to the wxWidgets top folder.
|
|
||||||
|
|
||||||
|
|
||||||
#2c.Create the "build-msw-static" folder to build the static libraries
|
|
||||||
mkdir -p build-msw-static
|
|
||||||
|
|
||||||
#2d.Configure wxWidgets
|
|
||||||
# Option "--disable-precomp-headers" is NOT needed.
|
|
||||||
# I am doing it to check for compile issues;
|
|
||||||
# And, I think my old 32 bit Windows machine
|
|
||||||
# works best with it disabled.
|
|
||||||
cd build-msw-static && \
|
|
||||||
../configure --with-msw \
|
|
||||||
--disable-shared \
|
|
||||||
--disable-precomp-headers \
|
|
||||||
&& cd ..
|
|
||||||
|
|
||||||
#2e.make the wxMSW static libraries
|
|
||||||
cd build-msw-static && make && cd ..
|
|
||||||
|
|
||||||
|
|
||||||
#3 Build and run the minimal static sample
|
|
||||||
#3a.Clean the minimal sample
|
|
||||||
cd build-msw-static/samples/minimal && make clean && cd ../../..
|
|
||||||
|
|
||||||
#3b.Build the minimal sample
|
|
||||||
cd build-msw-static/samples/minimal && make && cd ../../..
|
|
||||||
|
|
||||||
#3c.Run the minimal sample
|
|
||||||
./build-msw-static/samples/minimal/minimal.exe
|
|
||||||
|
|
||||||
|
|
||||||
#4 Clean the static samples
|
|
||||||
cd build-msw-static/samples && make clean && cd ../..
|
|
||||||
|
|
||||||
#5 Build and run the typetest static sample to verify MIME database works
|
|
||||||
cd build-msw-static/samples/typetest && make && cd ../../..
|
|
||||||
./build-msw-static/samples/typetest/typetest.exe
|
|
||||||
|
|
||||||
#6 Build and run the drawing static sample
|
|
||||||
cd build-msw-static/samples/drawing && make && cd ../../..
|
|
||||||
cd samples/drawing && ../../build-msw-static/samples/drawing/drawing.exe && cd ../..
|
|
||||||
|
|
||||||
#7 Build and run the splash static sample
|
|
||||||
cd build-msw-static/samples/splash && make && cd ../../..
|
|
||||||
cd samples/splash && ../../build-msw-static/samples/splash/splash.exe && cd ../..
|
|
||||||
|
|
||||||
#8 Build and run the widgets static sample
|
|
||||||
cd build-msw-static/samples/widgets && make && cd ../../..
|
|
||||||
cd samples/widgets && ../../build-msw-static/samples/widgets/widgets.exe && cd ../..
|
|
||||||
|
|
||||||
#9 Build all the rest of the static samples
|
|
||||||
cd build-msw-static/samples && make && cd ../..
|
|
@@ -1,7 +1,7 @@
|
|||||||
This is wxWidgets for Windows (wxMSW)
|
This is wxWidgets for Windows (wxMSW)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
For information on installing wxWidgets, please see install.txt.
|
For information on installing wxWidgets, please see install.md.
|
||||||
|
|
||||||
For further information, please see docs/html/index.htm and the
|
For further information, please see docs/html/index.htm and the
|
||||||
wxWidgets reference manual.
|
wxWidgets reference manual.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
Microsoft Windows XP Support from wxWidgets
|
Microsoft Windows XP Support from wxWidgets {#plat_msw_winxp}
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
|
|
||||||
Windows XP introduces the themes (called "visual styles" in the Microsoft
|
Windows XP introduces the themes (called "visual styles" in the Microsoft
|
||||||
@@ -30,27 +30,25 @@ for more details.
|
|||||||
Here is the example manifest which you can put into controls.exe.manifest
|
Here is the example manifest which you can put into controls.exe.manifest
|
||||||
file to test theme support using the controls sample:
|
file to test theme support using the controls sample:
|
||||||
|
|
||||||
--- cut here ---
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assemblyIdentity
|
||||||
<assemblyIdentity
|
version="0.64.1.0"
|
||||||
version="0.64.1.0"
|
processorArchitecture="x86"
|
||||||
processorArchitecture="x86"
|
name="Controls"
|
||||||
name="Controls"
|
type="win32"
|
||||||
type="win32"
|
/>
|
||||||
/>
|
<description>Controls: wxWidgets sample application</description>
|
||||||
<description>Controls: wxWidgets sample application</description>
|
<dependency>
|
||||||
<dependency>
|
<dependentAssembly>
|
||||||
<dependentAssembly>
|
<assemblyIdentity
|
||||||
<assemblyIdentity
|
type="win32"
|
||||||
type="win32"
|
name="Microsoft.Windows.Common-Controls"
|
||||||
name="Microsoft.Windows.Common-Controls"
|
version="6.0.0.0"
|
||||||
version="6.0.0.0"
|
processorArchitecture="X86"
|
||||||
processorArchitecture="X86"
|
publicKeyToken="6595b64144ccf1df"
|
||||||
publicKeyToken="6595b64144ccf1df"
|
language="*"
|
||||||
language="*"
|
/>
|
||||||
/>
|
</dependentAssembly>
|
||||||
</dependentAssembly>
|
</dependency>
|
||||||
</dependency>
|
</assembly>
|
||||||
</assembly>
|
|
||||||
--- cut here ---
|
|
@@ -1,6 +1,8 @@
|
|||||||
wxWidgets for OS X installation
|
wxWidgets for OS X installation {#plat_osx_install}
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
wxWidgets can be compiled using Apple's Cocoa library.
|
wxWidgets can be compiled using Apple's Cocoa library.
|
||||||
|
|
||||||
Most OS X developers should start by downloading and installing Xcode
|
Most OS X developers should start by downloading and installing Xcode
|
||||||
@@ -14,45 +16,42 @@ Next use Terminal (under Applications, Utilities, Terminal) to access a command
|
|||||||
prompt. Use cd to change directories to your wxWidgets directory and execute
|
prompt. Use cd to change directories to your wxWidgets directory and execute
|
||||||
the following sets of commands from the wxWidgets directory.
|
the following sets of commands from the wxWidgets directory.
|
||||||
|
|
||||||
---------
|
mkdir build-cocoa-debug
|
||||||
|
cd build-cocoa-debug
|
||||||
|
../configure --enable-debug
|
||||||
|
make
|
||||||
|
|
||||||
mkdir build-cocoa-debug
|
Build the samples and demos
|
||||||
cd build-cocoa-debug
|
|
||||||
../configure --enable-debug
|
|
||||||
make
|
|
||||||
# Build the samples and demos
|
|
||||||
cd samples; make;cd ..
|
|
||||||
cd demos; make;cd ..
|
|
||||||
|
|
||||||
---------
|
cd samples; make;cd ..
|
||||||
|
cd demos; make;cd ..
|
||||||
|
|
||||||
After the compilation completes, use Finder to run the samples and demos
|
After the compilation completes, use Finder to run the samples and demos
|
||||||
Go to build-cocoa-debug/samples to experiment with the Cocoa samples.
|
* Go to build-cocoa-debug/samples to experiment with the Cocoa samples.
|
||||||
Go to build-cocoa-debug/demos to experiment with the Cocoa demos.
|
* Go to build-cocoa-debug/demos to experiment with the Cocoa demos.
|
||||||
Double-click on the executables which have an icon showing three small squares.
|
* Double-click on the executables which have an icon showing three small squares.
|
||||||
The source code for the samples is in wxWidgets/samples
|
* The source code for the samples is in wxWidgets/samples
|
||||||
The source code for the demos is in wxWidgets/demos
|
* The source code for the demos is in wxWidgets/demos
|
||||||
|
|
||||||
---------
|
|
||||||
|
|
||||||
More information about building on OS X is available in the wxWiki.
|
More information about building on OS X is available in the wxWiki.
|
||||||
Here are two useful links
|
Here are two useful links
|
||||||
https://wiki.wxwidgets.org/Guides_%26_Tutorials
|
* https://wiki.wxwidgets.org/Guides_%26_Tutorials
|
||||||
https://wiki.wxwidgets.org/Development:_wxMac
|
* https://wiki.wxwidgets.org/Development:_wxMac
|
||||||
|
|
||||||
---------
|
|
||||||
|
|
||||||
More advanced topics are covered below.
|
Advanced topics {#osx_advanced}
|
||||||
|
===============
|
||||||
|
|
||||||
---------
|
Installing library {#osx_install}
|
||||||
|
------------------
|
||||||
|
|
||||||
If you want to install the library into the system directories you'll need
|
If you want to install the library into the system directories you'll need
|
||||||
to do this as root. The accepted way of running commands as root is to
|
to do this as root. The accepted way of running commands as root is to
|
||||||
use the built-in sudo mechanism. First of all, you must be using an
|
use the built-in sudo mechanism. First of all, you must be using an
|
||||||
account marked as a "Computer Administrator". Then
|
account marked as a "Computer Administrator". Then
|
||||||
|
|
||||||
6) sudo make install
|
sudo make install
|
||||||
7) type <YOUR OWN PASSWORD>
|
type \<YOUR OWN PASSWORD\>
|
||||||
|
|
||||||
Note that while using this method is okay for development, it is not
|
Note that while using this method is okay for development, it is not
|
||||||
recommended that you require endusers to install wxWidgets into their
|
recommended that you require endusers to install wxWidgets into their
|
||||||
@@ -61,13 +60,13 @@ is to configure wxWidgets with --disable-shared. Another way to avoid
|
|||||||
it is to make a framework for wxWidgets. Making frameworks is beyond
|
it is to make a framework for wxWidgets. Making frameworks is beyond
|
||||||
the scope of this document.
|
the scope of this document.
|
||||||
|
|
||||||
Note:
|
**Note:**
|
||||||
It is rarely desirable to install non-Apple software into system directories.
|
It is rarely desirable to install non-Apple software into system directories.
|
||||||
By configuring the library with --disable-shared and using the full path
|
By configuring the library with --disable-shared and using the full path
|
||||||
to wx-config with the --in-place option you can avoid installing the library.
|
to wx-config with the --in-place option you can avoid installing the library.
|
||||||
|
|
||||||
|
|
||||||
Apple Developer Tools: Xcode
|
Apple Developer Tools: Xcode {#osx_xcode}
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
You can use the project in build/osx/wxcocoa.xcodeproj to build the Cocoa
|
You can use the project in build/osx/wxcocoa.xcodeproj to build the Cocoa
|
||||||
@@ -79,10 +78,10 @@ also wxrc tool which doesn't have its own Xcode project. If you need this tool,
|
|||||||
the simplest possibility is to build it from the command line after installing
|
the simplest possibility is to build it from the command line after installing
|
||||||
the libraries using commands like this:
|
the libraries using commands like this:
|
||||||
|
|
||||||
$ cd utils/wxrc
|
$ cd utils/wxrc
|
||||||
$ g++ -o wxrc wxrc.cpp `wx-config --cxxflags --libs base,xml`
|
$ g++ -o wxrc wxrc.cpp `wx-config --cxxflags --libs base,xml`
|
||||||
|
|
||||||
Creating universal binaries
|
Creating universal binaries {#osx_universal_bin}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
The Xcode projects for the wxWidgets library and minimal project are set up
|
The Xcode projects for the wxWidgets library and minimal project are set up
|
||||||
@@ -108,11 +107,11 @@ binaries together. Assuming building on a PPC system:
|
|||||||
|
|
||||||
2. Then, build for Intel, in a different folder. This time use:
|
2. Then, build for Intel, in a different folder. This time use:
|
||||||
|
|
||||||
export CFLAGS="-g -isysroot /Developer/SDKs/MacOSX10.7.sdk -arch i386"
|
export CFLAGS="-g -isysroot /Developer/SDKs/MacOSX10.7.sdk -arch i386"
|
||||||
export LDFLAGS="-syslibroot,/Developer/SDKs/MacOSX10.7.sdk"
|
export LDFLAGS="-syslibroot,/Developer/SDKs/MacOSX10.7.sdk"
|
||||||
|
|
||||||
./configure --disable-dependency-tracking --enable-static=yes --enable-shared=no \
|
./configure --disable-dependency-tracking --enable-static=yes --enable-shared=no \
|
||||||
--target=i386-apple-darwin8 --host=powerpc-apple-darwin8 --build=i386-apple-darwin8
|
--target=i386-apple-darwin8 --host=powerpc-apple-darwin8 --build=i386-apple-darwin8
|
||||||
|
|
||||||
You will need to reverse the powerpc and i386 parameters everywhere to build PPC on an Intel
|
You will need to reverse the powerpc and i386 parameters everywhere to build PPC on an Intel
|
||||||
machine.
|
machine.
|
@@ -4,7 +4,7 @@ More Information is available from the wxWidgets project home page at
|
|||||||
|
|
||||||
https://www.wxwidgets.org
|
https://www.wxwidgets.org
|
||||||
|
|
||||||
For more information, please see install.txt and the manuals.
|
For more information, please see install.md and the manuals.
|
||||||
|
|
||||||
Please send problems concerning installation, feature requests,
|
Please send problems concerning installation, feature requests,
|
||||||
bug reports or comments to the wxWidgets users list. Information
|
bug reports or comments to the wxWidgets users list. Information
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# wxQt Architecture
|
# wxQt Architecture {#plat_qt_architecture}
|
||||||
|
|
||||||
## Internals
|
## Internals
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
wxWidgets for Qt installation
|
wxWidgets for Qt installation {#plat_qt_install}
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
IMPORTANT NOTE:
|
IMPORTANT NOTE:
|
||||||
|
|
||||||
If you experience problems installing, please re-read these
|
If you experience problems installing, please re-read these
|
||||||
@@ -13,19 +15,23 @@ IMPORTANT NOTE:
|
|||||||
using (including the beta) and what compiler on what system. One
|
using (including the beta) and what compiler on what system. One
|
||||||
example: wxQt 3.1.0, GCC 4.8.1, Ubuntu 14.04
|
example: wxQt 3.1.0, GCC 4.8.1, Ubuntu 14.04
|
||||||
|
|
||||||
* The simplest case
|
Installation {#qt_install}
|
||||||
|
============
|
||||||
|
|
||||||
|
The simplest case {#qt_simple}
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
If you compile wxWidgets on Linux for the first time and don't like to read
|
If you compile wxWidgets on Linux for the first time and don't like to read
|
||||||
install instructions just do (in the base dir):
|
install instructions just do (in the base dir):
|
||||||
|
|
||||||
> mkdir buildqt
|
> mkdir buildqt
|
||||||
> cd buildqt
|
> cd buildqt
|
||||||
> ../configure --with-qt
|
> ../configure --with-qt
|
||||||
> make
|
> make
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make install
|
> make install
|
||||||
> ldconfig
|
> ldconfig
|
||||||
|
|
||||||
[if you get "ldconfig: command not found", try using "/sbin/ldconfig"]
|
[if you get "ldconfig: command not found", try using "/sbin/ldconfig"]
|
||||||
|
|
||||||
If you don't do the 'make install' part, you can still use the libraries from
|
If you don't do the 'make install' part, you can still use the libraries from
|
||||||
@@ -33,11 +39,11 @@ the buildgtk directory, but they may not be available to other users.
|
|||||||
|
|
||||||
If you want to remove wxWidgets on Unix you can do this:
|
If you want to remove wxWidgets on Unix you can do this:
|
||||||
|
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make uninstall
|
> make uninstall
|
||||||
> ldconfig
|
> ldconfig
|
||||||
|
|
||||||
* The simplest errors
|
The simplest errors {#qt_error_simple}
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
For any configure errors: please look at config.log file which was generated
|
For any configure errors: please look at config.log file which was generated
|
||||||
@@ -52,20 +58,20 @@ qtconfig/pkg-config. Also check that your LD_LIBRARY_PATH or equivalent
|
|||||||
variable contains the path to Qt libraries if they were installed in a
|
variable contains the path to Qt libraries if they were installed in a
|
||||||
non-default location.
|
non-default location.
|
||||||
|
|
||||||
* The simplest program
|
The simplest program {#qt_simple_app}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Now create your super-application myfoo.cpp and compile anywhere with
|
Now create your super-application myfoo.cpp and compile anywhere with
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
||||||
|
|
||||||
* GUI libraries
|
GUI libraries {#qt_libs_ui}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
wxWidgets/Qt requires the Qt library to be installed on your system. It has
|
wxWidgets/Qt requires the Qt library to be installed on your system. It has
|
||||||
to be a stable version, preferably Qt 5.2.1 or later.
|
to be a stable version, preferably Qt 5.2.1 or later.
|
||||||
|
|
||||||
* Building wxQT on Ubuntu
|
Building wxQT on Ubuntu {#qt_build_ubuntu}
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Install latest Qt5 packages (qt5-default). To build unit tests, libcppunit-dev
|
Install latest Qt5 packages (qt5-default). To build unit tests, libcppunit-dev
|
||||||
@@ -77,21 +83,21 @@ libgstreamer-plugins-base0.10-dev)
|
|||||||
|
|
||||||
Then create a build directory, configure and compile:
|
Then create a build directory, configure and compile:
|
||||||
|
|
||||||
mkdir bldqt5
|
mkdir bldqt5
|
||||||
cd bldqt5
|
cd bldqt5
|
||||||
../configure --with-qt --enable-debug
|
../configure --with-qt --enable-debug
|
||||||
make
|
make
|
||||||
make samples
|
make samples
|
||||||
|
|
||||||
If everything is ok, you can do the make install as specified before.
|
If everything is ok, you can do the make install as specified before.
|
||||||
|
|
||||||
Optionally, you can build and run Unit Tests:
|
Optionally, you can build and run Unit Tests:
|
||||||
|
|
||||||
cd tests
|
cd tests
|
||||||
make
|
make
|
||||||
./test_gui
|
./test_gui
|
||||||
|
|
||||||
* Building wxQT, using qt-unified-XXX-online installer
|
Building wxQT, using qt-unified-XXX-online installer {#qt_build}
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
||||||
Download qt-unified-XXX-online installer from the qt website.
|
Download qt-unified-XXX-online installer from the qt website.
|
||||||
@@ -100,30 +106,32 @@ restriction as above).
|
|||||||
The same build instructions apply, except that you need to explicitly pass
|
The same build instructions apply, except that you need to explicitly pass
|
||||||
to configure the Qt dir of the build intended to use as QT5_CUSTOM_DIR, i.e.
|
to configure the Qt dir of the build intended to use as QT5_CUSTOM_DIR, i.e.
|
||||||
|
|
||||||
# for Linux:
|
for Linux:
|
||||||
../configure --with-qt --enable-debug QT5_CUSTOM_DIR=~/Qt/5.11.0/gcc_64
|
|
||||||
|
|
||||||
# for Windows (ran from Git Bash, or any other Unix-like shell):
|
../configure --with-qt --enable-debug QT5_CUSTOM_DIR=~/Qt/5.11.0/gcc_64
|
||||||
# (the syntax for the drive in the path is required by ar and ld)
|
|
||||||
../configure --with-qt --enable-debug QT5_CUSTOM_DIR=c:/Qt/5.11.0/mingw53_32
|
|
||||||
|
|
||||||
* Building wxGT on Android
|
for Windows (ran from Git Bash, or any other Unix-like shell):
|
||||||
|
(the syntax for the drive in the path is required by ar and ld)
|
||||||
|
|
||||||
|
../configure --with-qt --enable-debug QT5_CUSTOM_DIR=c:/Qt/5.11.0/mingw53_32
|
||||||
|
|
||||||
|
Building wxGT on Android {#qt_android}
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Download Android Native Development Kit (NDK), tandalone Android Software
|
Download Android Native Development Kit (NDK), tandalone Android Software
|
||||||
Development Kit (SDK), install them and perform the following instructions to
|
Development Kit (SDK), install them and perform the following instructions to
|
||||||
prepare the cross-compilation tool-chain to (change NDK and other paths):
|
prepare the cross-compilation tool-chain to (change NDK and other paths):
|
||||||
|
|
||||||
NDK=~/src/android-ndk-r9d
|
NDK=~/src/android-ndk-r9d
|
||||||
SDK=~/src/android-sdk-linux
|
SDK=~/src/android-sdk-linux
|
||||||
export ANDROID_NDK_ROOT=$NDK
|
export ANDROID_NDK_ROOT=$NDK
|
||||||
$NDK/build/tools/make-standalone-toolchain.sh \
|
$NDK/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=arm-linux-androideabi-4.8 --platform=android-9 \
|
--toolchain=arm-linux-androideabi-4.8 --platform=android-9 \
|
||||||
--install-dir=/tmp/ndk
|
--install-dir=/tmp/ndk
|
||||||
|
|
||||||
export PATH=/tmp/ndk/bin:$PATH
|
export PATH=/tmp/ndk/bin:$PATH
|
||||||
export CC=arm-linux-androideabi-gcc
|
export CC=arm-linux-androideabi-gcc
|
||||||
export CXX=arm-linux-androideabi-g++
|
export CXX=arm-linux-androideabi-g++
|
||||||
|
|
||||||
|
|
||||||
Also, you'll need to download the Qt library bundle that matches your operating
|
Also, you'll need to download the Qt library bundle that matches your operating
|
||||||
@@ -134,22 +142,23 @@ cross-compile for that architectures)
|
|||||||
Then, create a build directory (under the wxWidgets folder), configure for
|
Then, create a build directory (under the wxWidgets folder), configure for
|
||||||
Andrid (disable currently unsupported/uneeded features) and run make:
|
Andrid (disable currently unsupported/uneeded features) and run make:
|
||||||
|
|
||||||
cd ~/src/wxWidgets
|
cd ~/src/wxWidgets
|
||||||
mkdir bldqt5droid
|
mkdir bldqt5droid
|
||||||
cd bldqt5droid
|
cd bldqt5droid
|
||||||
../configure --with-qt --enable-debug --build=x86_64-unknown-linux-gnu \
|
../configure --with-qt --enable-debug --build=x86_64-unknown-linux-gnu \
|
||||||
--host=arm-linux-androideabi --disable-compat28 --disable-shared \
|
--host=arm-linux-androideabi --disable-compat28 --disable-shared \
|
||||||
--disable-arttango --enable-image --disable-dragimage --disable-sockets \
|
--disable-arttango --enable-image --disable-dragimage --disable-sockets \
|
||||||
--with-libtiff=no --without-opengl --disable-baseevtloop --disable-utf8
|
--with-libtiff=no --without-opengl --disable-baseevtloop --disable-utf8
|
||||||
make
|
make
|
||||||
|
|
||||||
You can now compile and link your app against this build, and finally
|
You can now compile and link your app against this build, and finally
|
||||||
package it for Android using standard APK tools.
|
package it for Android using standard APK tools.
|
||||||
|
|
||||||
* Create your configuration
|
Create your configuration {#qt_config}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
./configure options
|
./configure options
|
||||||
|
|
||||||
If you want to use system's C and C++ compiler,
|
If you want to use system's C and C++ compiler,
|
||||||
@@ -168,7 +177,7 @@ subdirectory of your wxWidgets installation) as this allows you to
|
|||||||
have multiple configurations (for example, debug and release or GTK
|
have multiple configurations (for example, debug and release or GTK
|
||||||
and Motif) simultaneously.
|
and Motif) simultaneously.
|
||||||
|
|
||||||
* Feature Options
|
Feature Options {#qt_feature_options}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
When producing an executable that is linked statically with wxQt
|
When producing an executable that is linked statically with wxQt
|
||||||
@@ -182,10 +191,3 @@ of all configurable options.
|
|||||||
Apart from disabling certain features you can very often "strip"
|
Apart from disabling certain features you can very often "strip"
|
||||||
the program of its debugging information resulting in a significant
|
the program of its debugging information resulting in a significant
|
||||||
reduction in size.
|
reduction in size.
|
||||||
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
In the hope that it will be useful,
|
|
||||||
|
|
||||||
The wxWidgets Team
|
|
||||||
|
|
@@ -1,6 +1,8 @@
|
|||||||
wxWidgets for X11 installation
|
wxWidgets for X11 installation {#plat_x11_install}
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
IMPORTANT NOTE:
|
IMPORTANT NOTE:
|
||||||
|
|
||||||
If you experience problems installing, please re-read these
|
If you experience problems installing, please re-read these
|
||||||
@@ -13,7 +15,7 @@ IMPORTANT NOTE:
|
|||||||
using (including the beta) and what compiler on what system. One
|
using (including the beta) and what compiler on what system. One
|
||||||
example: wxX11 2.8.0, gcc 2.95.4, Redhat 6.2
|
example: wxX11 2.8.0, gcc 2.95.4, Redhat 6.2
|
||||||
|
|
||||||
First steps
|
First steps {#x11_first_steps}
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
- Download wxX11-x.y.z.tgz, where x.y.z is the version number.
|
- Download wxX11-x.y.z.tgz, where x.y.z is the version number.
|
||||||
@@ -34,38 +36,38 @@ First steps
|
|||||||
information about your platform and the (relevant part of) contents of
|
information about your platform and the (relevant part of) contents of
|
||||||
config.log file).
|
config.log file).
|
||||||
|
|
||||||
COMPILING USING CONFIGURE
|
Compiling using configure {#x11_configure}
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
* The simplest case
|
The simplest case {#x11_simple}
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
If you compile wxWidgets on Linux for the first time and don't like to read
|
If you compile wxWidgets on Linux for the first time and don't like to read
|
||||||
install instructions just do (in the base dir):
|
install instructions just do (in the base dir):
|
||||||
|
|
||||||
> ./configure --with-x11
|
> ./configure --with-x11
|
||||||
> make
|
> make
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make install
|
> make install
|
||||||
> ldconfig
|
> ldconfig
|
||||||
> exit
|
> exit
|
||||||
|
|
||||||
Afterwards you can continue with
|
Afterwards you can continue with
|
||||||
|
|
||||||
> make
|
> make
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make install
|
> make install
|
||||||
> ldconfig
|
> ldconfig
|
||||||
> exit
|
> exit
|
||||||
|
|
||||||
If you want to remove wxWidgets on Unix you can do this:
|
If you want to remove wxWidgets on Unix you can do this:
|
||||||
|
|
||||||
> su <type root password>
|
> su <type root password>
|
||||||
> make uninstall
|
> make uninstall
|
||||||
> ldconfig
|
> ldconfig
|
||||||
> exit
|
> exit
|
||||||
|
|
||||||
* The expert case
|
The expert case {#x11_expert}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
If you want to do some more serious cross-platform programming with wxWidgets,
|
If you want to do some more serious cross-platform programming with wxWidgets,
|
||||||
@@ -80,25 +82,25 @@ that purpose.
|
|||||||
For building three versions (one GTK, one X11 and a debug version of the GTK
|
For building three versions (one GTK, one X11 and a debug version of the GTK
|
||||||
source) you'd do this:
|
source) you'd do this:
|
||||||
|
|
||||||
md buildx11
|
md buildx11
|
||||||
cd buildx11
|
cd buildx11
|
||||||
../configure --with-x11
|
../configure --with-x11
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
md buildgtk
|
md buildgtk
|
||||||
cd buildgtk
|
cd buildgtk
|
||||||
../configure --with-gtk
|
../configure --with-gtk
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
md buildgtkd
|
md buildgtkd
|
||||||
cd buildgtkd
|
cd buildgtkd
|
||||||
../configure --with-gtk --enable-debug_flag
|
../configure --with-gtk --enable-debug_flag
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
* The simplest errors
|
The simplest errors {#x11_errors}
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
You get errors during compilation: The reason is that you probably have a
|
You get errors during compilation: The reason is that you probably have a
|
||||||
@@ -108,18 +110,18 @@ GCC 2.95 or later.
|
|||||||
|
|
||||||
You get immediate segfault when starting any sample or application: This is
|
You get immediate segfault when starting any sample or application: This is
|
||||||
either due to having compiled the library with different flags or options than
|
either due to having compiled the library with different flags or options than
|
||||||
your program - typically you might have the __WXDEBUG__ option set for the
|
your program - typically you might have the `__WXDEBUG__` option set for the
|
||||||
library but not for your program - or due to using a compiler with optimisation
|
library but not for your program - or due to using a compiler with optimisation
|
||||||
bugs.
|
bugs.
|
||||||
|
|
||||||
* The simplest program
|
The simplest program {#x11_simple_app}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Now create your super-application myfoo.cpp and compile anywhere with
|
Now create your super-application myfoo.cpp and compile anywhere with
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
|
||||||
|
|
||||||
* General
|
General {#x11_general}
|
||||||
---------
|
---------
|
||||||
|
|
||||||
The Unix variants of wxWidgets use GNU configure. If you have problems with
|
The Unix variants of wxWidgets use GNU configure. If you have problems with
|
||||||
@@ -127,19 +129,19 @@ your make use GNU make instead.
|
|||||||
|
|
||||||
If you have general problems with installation, see the wxWidgets website at
|
If you have general problems with installation, see the wxWidgets website at
|
||||||
|
|
||||||
https://www.wxwidgets.org/
|
https://www.wxwidgets.org/
|
||||||
|
|
||||||
for newest information. If you still don't have any success, please send a bug
|
for newest information. If you still don't have any success, please send a bug
|
||||||
report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
|
report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
|
||||||
YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF X, WHAT DISTRIBUTION
|
YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF X, WHAT DISTRIBUTION
|
||||||
YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
|
YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
|
||||||
|
|
||||||
* GUI libraries
|
GUI libraries {#x11_libs_gui}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
wxWidgets/X11 requires the X11 library to be installed on your system.
|
wxWidgets/X11 requires the X11 library to be installed on your system.
|
||||||
|
|
||||||
* Additional libraries
|
Additional libraries {#x11_libs_misc}
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
wxWidgets/X11 requires a thread library and X libraries known to work with
|
wxWidgets/X11 requires a thread library and X libraries known to work with
|
||||||
@@ -150,14 +152,14 @@ many aspects. As of writing this, virtually all Linux distributions have
|
|||||||
|
|
||||||
You can disable thread support by running
|
You can disable thread support by running
|
||||||
|
|
||||||
./configure --disable-threads
|
./configure --disable-threads
|
||||||
make
|
make
|
||||||
su <type root password>
|
su <type root password>
|
||||||
make install
|
make install
|
||||||
ldconfig
|
ldconfig
|
||||||
exit
|
exit
|
||||||
|
|
||||||
* Building wxX11 on Cygwin
|
Building wxX11 on Cygwin {#x11_cygwin}
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
The normal build instructions should work fine on Cygwin. The one difference
|
The normal build instructions should work fine on Cygwin. The one difference
|
||||||
@@ -171,10 +173,11 @@ will see linking errors. If this happens then you can work around the
|
|||||||
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
|
problem by setting LDFLAGS=-Wl,--export-all-symbols. Please also let us know
|
||||||
about it on the wx-dev mailing list.
|
about it on the wx-dev mailing list.
|
||||||
|
|
||||||
* Create your configuration
|
Create your configuration {#x11_config}
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
./configure [options]
|
./configure [options]
|
||||||
|
|
||||||
If you want to use system's C and C++ compiler,
|
If you want to use system's C and C++ compiler,
|
||||||
@@ -202,7 +205,7 @@ Configure will complain if the system variable OSTYPE has
|
|||||||
not been defined. And Make in some circumstances as well...
|
not been defined. And Make in some circumstances as well...
|
||||||
|
|
||||||
|
|
||||||
* General options
|
General options {#x11_options}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Given below are the commands to change the default behaviour,
|
Given below are the commands to change the default behaviour,
|
||||||
@@ -268,7 +271,7 @@ The following options handle the kind of library you want to build.
|
|||||||
must be compiled with the same debug
|
must be compiled with the same debug
|
||||||
options.
|
options.
|
||||||
|
|
||||||
* Feature Options
|
Feature Options {#x11_feature_options}
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Many of the configure options have been thoroughly tested
|
Many of the configure options have been thoroughly tested
|
||||||
@@ -320,7 +323,7 @@ Please see the output of "./configure --help" for comprehensive list
|
|||||||
of all configurable options.
|
of all configurable options.
|
||||||
|
|
||||||
|
|
||||||
* Compiling
|
Compiling {#x11_compiling}
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The following must be done in the base directory (e.g. ~/wxX11
|
The following must be done in the base directory (e.g. ~/wxX11
|
||||||
@@ -356,44 +359,44 @@ object-files:
|
|||||||
|
|
||||||
in the various directories will do the work for you.
|
in the various directories will do the work for you.
|
||||||
|
|
||||||
* Creating a new Project
|
Creating a new Project {#x11_new_app}
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
1) The first way uses the installed libraries and header files
|
1. The first way uses the installed libraries and header files
|
||||||
automatically using wx-config
|
automatically using wx-config
|
||||||
|
|
||||||
g++ myfoo.cpp `wx-config --libs` `wx-config --cxxflags` -o myfoo
|
g++ myfoo.cpp `wx-config --libs` `wx-config --cxxflags` -o myfoo
|
||||||
|
|
||||||
Using this way, a make file for the minimal sample would look
|
Using this way, a make file for the minimal sample would look
|
||||||
like this
|
like this
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
|
||||||
minimal: minimal.o
|
minimal: minimal.o
|
||||||
$(CXX) -o minimal minimal.o `wx-config --libs`
|
$(CXX) -o minimal minimal.o `wx-config --libs`
|
||||||
|
|
||||||
minimal.o: minimal.cpp
|
minimal.o: minimal.cpp
|
||||||
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
|
$(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o minimal
|
rm -f *.o minimal
|
||||||
|
|
||||||
This is certain to become the standard way unless we decide
|
This is certain to become the standard way unless we decide
|
||||||
to stick to tmake.
|
to stick to tmake.
|
||||||
|
|
||||||
If your application uses only some of wxWidgets libraries, you can
|
If your application uses only some of wxWidgets libraries, you can
|
||||||
specify required libraries when running wx-config. For example,
|
specify required libraries when running wx-config. For example,
|
||||||
`wx-config --libs=html,core` will only output link command to link
|
`wx-config --libs=html,core` will only output link command to link
|
||||||
with libraries required by core GUI classes and wxHTML classes. See
|
with libraries required by core GUI classes and wxHTML classes. See
|
||||||
the manual for more information on the libraries.
|
the manual for more information on the libraries.
|
||||||
|
|
||||||
2) The other way creates a project within the source code
|
2. The other way creates a project within the source code
|
||||||
directories of wxWidgets. For this endeavour, you'll need
|
directories of wxWidgets. For this endeavour, you'll need
|
||||||
GNU autoconf version 2.14 and add an entry to your Makefile.in
|
GNU autoconf version 2.14 and add an entry to your Makefile.in
|
||||||
to the bottom of the configure.in script and run autoconf
|
to the bottom of the configure.in script and run autoconf
|
||||||
and configure before you can type make.
|
and configure before you can type make.
|
||||||
|
|
||||||
* Further notes by Julian Smart
|
Further notes by Julian Smart {#x11_notes}
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
- You may find the following script useful for compiling wxX11,
|
- You may find the following script useful for compiling wxX11,
|
||||||
@@ -401,25 +404,23 @@ and configure before you can type make.
|
|||||||
permissions). Make this script executable with the command
|
permissions). Make this script executable with the command
|
||||||
chmod a+x makewxx11.
|
chmod a+x makewxx11.
|
||||||
|
|
||||||
-------:x-----Cut here-----:x-----
|
# makewxx11
|
||||||
# makewxx11
|
# Sets permissions (in case we extracted wxX11 from zip files)
|
||||||
# Sets permissions (in case we extracted wxX11 from zip files)
|
# and makes wxX11.
|
||||||
# and makes wxX11.
|
# Call from top-level wxWidgets directory.
|
||||||
# Call from top-level wxWidgets directory.
|
# Note that this uses standard (but commonly-used) configure options;
|
||||||
# Note that this uses standard (but commonly-used) configure options;
|
# if you're feeling brave, you may wish to compile with threads:
|
||||||
# if you're feeling brave, you may wish to compile with threads:
|
# if they're not supported by the target platform, they will be disabled
|
||||||
# if they're not supported by the target platform, they will be disabled
|
# anyhow
|
||||||
# anyhow
|
# -- Julian Smart
|
||||||
# -- Julian Smart
|
chmod a+x configure config.sub config.guess
|
||||||
chmod a+x configure config.sub config.guess
|
./configure --with-x11 --with-shared --with-debug_flag --with-debug_info --enable-debug --without-threads --without-sockets --without-odbc
|
||||||
./configure --with-x11 --with-shared --with-debug_flag --with-debug_info --enable-debug --without-threads --without-sockets --without-odbc
|
make
|
||||||
make
|
|
||||||
-------:x-----Cut here-----:x-----
|
|
||||||
|
|
||||||
This script will build wxX11 using shared libraries. If you want to build
|
This script will build wxX11 using shared libraries. If you want to build
|
||||||
a static wxWidgets library, use --disable-shared.
|
a static wxWidgets library, use --disable-shared.
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting {#x11_troubleshooting}
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
- Solaris compilation with gcc: if the compiler has problems with the variable
|
- Solaris compilation with gcc: if the compiler has problems with the variable
|
||||||
@@ -437,7 +438,7 @@ Troubleshooting
|
|||||||
If you find any incorrect instances, though, such as a
|
If you find any incorrect instances, though, such as a
|
||||||
missing 'const' in an overridden function, please let us know.
|
missing 'const' in an overridden function, please let us know.
|
||||||
|
|
||||||
Other Notes
|
Other Notes {#x11_misc_notes}
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
- Debugging mode is switched on by default in the makefiles, but using
|
- Debugging mode is switched on by default in the makefiles, but using
|
||||||
@@ -448,11 +449,3 @@ Other Notes
|
|||||||
configure system, change --with-debug_flag to --without-debug_flag
|
configure system, change --with-debug_flag to --without-debug_flag
|
||||||
and --with-debug_info to --without-debug_info in the makewxx11
|
and --with-debug_info to --without-debug_info in the makewxx11
|
||||||
script).
|
script).
|
||||||
|
|
||||||
Bug reports
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Please send bug reports with a description of your environment,
|
|
||||||
compiler and the error message(s) to the developers mailing list at:
|
|
||||||
|
|
||||||
https://www.wxwidgets.org/support/mailing-lists/
|
|
Reference in New Issue
Block a user