vignette

wxWidgets

vignette

fr flag

 

 

wxWidgets 3.1.2

The 3.1.2 version is an example, I used the same method with 2.8.13 and 3.0.2 (in order to check the compatibility of the code with either versions, (it came with some surprises ...).

Making several builds based on one wxWidgets version :
You could need, for instance, a static build for Linux, another for cross compiling Windows 32 bits executables, and a third for cross compiling 64 bits Windows exes.
Better create a separate directory for each build
You may create (in root mode):
/opt/Persowx312_Lin64
/opt/Persowx312_Win32
/opt/Persowx312_Win64

Download the elected wxWidgets version (or versions if need be) For instance wxWidgets-3.1.2.tar.bz2 for the 3.1.2 version
Uncompress it where convenient ~/chezmoi/wxWin
After extraction, you've got a directory ~/chezmoi/wxWin/wxWidgets-3.1.2
Create a subdirectory to use as a working place eg : ~/chezmoi/wxWin/wxWidgets-3.1.2/wxPersoBuild
In console mode move into the working directory (cd ~/chezmoi/wxWin/wxWidgets-3.1.2/wxPersoBuild)

Everything is now in place. Let's do the real job.

The "configure" script checks that nothing's lacking and fine tunes the compiling options.
The "--prefix" argument specifies the target directory where the compiled files will be placed.
"--enable-static --disable-shared" will give a wxWidgets version aimed at stand alone executables, with limited dependancies (the resulting files will be of course larger).
In console mode enter :
../configure --prefix=/opt/Persowx312_Lin64 --enable-optimise --enable-stl --enable-unicode --enable-threads --disable-shared --enable-graphics_ctx

Expected result :
Configured wxWidgets 3.1.2 for `x86_64-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 3 with support for GTK+ printing
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         no
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                yes
                                       jpeg               builtin
                                       png                sys
                                       regex              builtin
                                       tiff               builtin
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no
                                       
Now it's time for the actual compiling (it takes around 20 minutes)
make
Up to this point everything is contained in the working directory.
You need to switch to root mode to move the files to their final destination.
sudo make install

Some clean up :
make distclean (to clean most of the files in the working directory)
Wipe all files in the working directory to keep things tidy

In a quite similar way you can set up the cross-compiling version

32 bits Version
Few changes. The install prefix of course, and the "--host" argument that specifies the type of architecture the executables files will be used on. i686-w64-mingw32 for a Win32 architecture
../configure --prefix=/opt/Persowx312_Win32 --host=i686-w64-mingw32 --enable-unicode --build=`../config.guess` --disable-shared
Result :
Configured wxWidgets 3.1.2 for `i686-w64-mingw32'

  Which GUI toolkit should wxWidgets use?                 msw
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         no
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               builtin
                                       png                builtin
                                       regex              builtin
                                       tiff               builtin
                                       zlib               builtin
                                       expat              builtin
                                       libmspack          no
                                       sdl                no
Then make
and sudo make install
Don't forget the cleanup as seen above.

64 bits Version
../configure --prefix=/opt/Persowx312_Win64 --host=x86_64-w64-mingw32 --enable-unicode --build=`../config.guess` --disable-shared
result :
Configured wxWidgets 3.1.2 for `x86_64-w64-mingw32'

  Which GUI toolkit should wxWidgets use?                 msw
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         no
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               builtin
                                       png                builtin
                                       regex              builtin
                                       tiff               builtin
                                       zlib               builtin
                                       expat              builtin
                                       libmspack          no
                                       sdl                no
make
and sudo make install
Some cleanup .

That's it !

 

Home