Building wxWidgets for Jazz++
Jazz++ uses a non-stock build of the
wxWidgets library.
wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11,
Motif, WinCE, and more using one codebase. This page describes how the Jazz++
version of wxWidgets was compiled for Windows, Linux, and the Mac. The Windows
build was generated using Visual Studio. Either Visual Studio .NET 2005 or
Visual Studio .NET 2008 can be used on Windows. The Linux install was tested
using Fedora 8 using GCC 4.1.2 and Mandriva 2008.0 using GCC 4.2.2. The Mac
build was tested using Mac OS X 10.5.2 and GCC 4.0.1.
Building wxWidgets for Windows
I have used these instructions with Visual Studio .NET 2005 (VC8) and Visual
Studio .NET 2008 (VC9). I used VC8 in the following text, but simply
substitute the appropriate VC9 veriage to create a Visual Studio .NET 2008
build. I have both builds living side-by-side on my hard drive.
-
Download
wxMSW-2.8.7.zip from the wxWidgets web site.
-
Extract the zip file to C:\ExternalPackages. Extracting creates a
wxMSW-2.8.7 directory directly under C:\ExternalPackages.
-
Change the name of the top-level wxWidgets directory to
wxMSW-2.8.7-VC8 so other versions of wxWidgets can be built with
other compilers in parallel with this directory.
-
If you would like wxWidgets help files in compiled HTML format (*.chm),
download wxWidgets-2.8.7-CHM.zip from the wxWidgets web site, and
extract the zip file to C:\ExternalPackages\wxMSW-2.8.7-VC8. This
installs the compiled HTML help files for wxWidgets and tex2rtf.
-
If you would like wxWidgets help files in HTML format, download
wxWidgets-2.8.7-HTML.zip from the wxWidgets web site, and extract the
zip file to C:\ExternalPackages\wxMSW-2.8.7-VC8. This installs the
HTML help files for wxWidgets and tex2rtf.
-
Make the following changes to
C:\ExternalPackages\wxMSW-2.8.7-VC8\include\wx\msw\setup.h:
| Macro |
From |
To |
| WXWIN_COMPATIBILITY_2_6 |
1 |
0 |
| wxUSE_STL |
0 |
1 |
| wxUSE_STD_IOSTREAM |
0 |
1 |
| wxUSE_GLCANVAS |
0 |
1 |
| wxUSE_IOSTREAMH |
1 |
0 |
Jazz++ doesn't use OpenGL code at this point, but I use this wxWidgets build
for other projects.
-
Edit C:\ExternalPackages\wxMSW-2.8.7-VC8\include\wx\msw\wx.rc and
comment out the following line.
#include "wx/msw/wince/wince.rc"
-
Use Start | All Programs | Microsoft Visual Studio .NET 2005 |
Visual Studio .NET Tools | Visual Studio .NET 2005 Command Prompt to
start a console session.
-
Ensure that the command-line compiler and tools (including nmake)
are installed and ready to run.
-
Change directory to C:\ExternalPackages\wxMSW-2.8.7-VC8\build\msw.
-
Build the debug static version of the wxWidgets libraries by typing:
nmake BUILD=debug SHARED=0 USE_OPENGL=1 -f makefile.vc
-
Build the release static version of the wxWidgets libraries by typing:
nmake BUILD=release SHARED=0 USE_OPENGL=1 -f makefile.vc
- To conserve disk space, remove the build directories (vc_msw and
vc_mswd) under c:\ExternalPackages\wxMSW-2.8.7-VC8\build\msw.
-
Change directory to
C:\ExternalPackages\wxMSW-2.8.7-VC8\utils\tex2rtf\src.
-
Build the release static version of tex2rtf by typing:
nmake BUILD=release SHARED=0 -f makefile.vc
-
Create a directory for the tex2rtf binaries under the wxWidgets
distribution (c:\ExternalPackages\wxMSW-2.8.7-VC8\bin).
-
Move the tex2rtf binaries from
c:\ExternalPackages\wxMSW-2.8.7-VC8\utils\tex2rtf\src\vc_msw to
c:\ExternalPackages\wxMSW-2.8.7-VC8\bin.
-
To conserve disk space, remove the build directory (vc_msw) under
c:\ExternalPackages\wxMSW-2.8.7-VC8\utils\tex2rtf\src.
Building wxWidgets for Linux
- Create a directory under your home directory. I typically use
OutsideSource and change directory to that location.
cd
mkdir OutsideSource
cd OutsideSource
- Checkout the 2.8 branch of wxWidgets using the following command.
You must have a Subversion client loaded on your machine.
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH wxWidgets-2.8
- Create a directory called WxBuild in parallel with the
wxWidgets-2.8 directory and change directory to that location.
mkdir WxBuild
cd WxBuild
- Run the wxWidgets supplied configure command with the following
configure options.
../wxWidgets-2.8/configure \
--prefix=/usr/local/wx287 \
--disable-no_exceptions \
--disable-no_rtti \
--disable-shared \
--disable-compat26 \
--disable-unicode \
--with-regex=builtin \
--enable-std_iostreams \
--enable-std_string \
--enable-stl \
--with-gtk
The prefix option is used so that the resulting wxWidgets build
will be installed in a non-standard location to prevent conflicts with OS
installed versions.
- Run make using the following command. This will write a file
called BuildLog that may be useful if you run into trouble.
make 2>&1 | tee BuildLog
- If all goes well with the build, try to install wxWidgets as root.
su
make install
-
Make sure your PATH and LIBRARY_PATH environment
variables are set to find the non-stock wxWidgets binaries and libraries just
created before building Jazz++. Adding the following lines in .bashrc
or .bash_profile will do the trick.
export PATH=/usr/local/wx287/bin:$PATH
export LIBRARY_PATH=/usr/local/wx287/lib:$LIBRARY_PATH
After adding the above lines to your .bashrc or .bash_profile
file, it is necessary to reload your bash environment to make these changes
available. Use one of the following commands to accomplish this;
(if you added the above lines to .bashrc)
source .bashrc
(if you added the above lines to .bash_profile)
source .bashrc
Building wxWidgets for Mac OS X 10.5.2
- Create a directory under your home directory. I typically use
OutsideSource and change directory to that location.
cd
mkdir OutsideSource
cd OutsideSource
-
Download
wxMac-2.8.7.tar.gz from the wxWidgets web site and extract this
file under your OutsideSource directory.
- Create a directory called WxBuild in parallel with the
wxMac-2.8.7 directory and change directory to that location.
mkdir WxBuild
cd WxBuild
- Run the wxWidgets supplied configure command with the following
configure options.
../wxWidgets-2.8/configure \
--prefix=$HOME/wx287 \
--disable-no_exceptions \
--disable-no_rtti \
--disable-shared \
--disable-compat26 \
--disable-unicode \
--with-regex=builtin \
--enable-std_iostreams \
--enable-std_string \
--enable-stl \
--with-mac
The prefix option is used so that the resulting wxWidgets build
will be installed in a non-standard under the user's home directory to prevent
conflicts with OS installed versions.
- Run make using the following command. This will write a file
called BuildLog that may be useful if you run into trouble.
make 2>&1 | tee BuildLog
- If all goes well with the build, try to install wxWidgets.
make install
-
Make sure your PATH and LIBRARY_PATH environment
variables are set to find the non-stock wxWidgets binaries and libraries just
created before building Jazz++. Adding the following lines in .bashrc
or .bash_profile will do the trick.
export PATH=/usr/local/wx287/bin:$PATH
export LIBRARY_PATH=/usr/local/wx287/lib:$LIBRARY_PATH
After adding the above lines to your .bashrc or .bash_profile
file, it is necessary to reload your bash environment to make these changes
available. Use one of the following commands to accomplish this;
(if you added the above lines to .bashrc)
source .bashrc
(if you added the above lines to .bash_profile)
source .bashrc
This project is hosted by SourceForge. Special thanks for SourceForge and the OSDN.
|