- Download and install the wxWindows-2.4.1
src-tree on your system.
- Download the dmcpatchkit.zip
from this site.
- Extract the dmcpatchkit.zip
(make sure you keep the the directoy
structure) and copy the files into the wxWindows src-tree. Be aware the
file in the src-tree will be overwritten with the ones from the dmcpatchkit.zip
file.
- Click here for makefile section
to build wxWindows with makefile's.
Or continue with point 5 when using the IDDE.
- Start the DigitalMars IDDE and open the project located in <wxWindows
directory>\src\msw\dmc_wxmsw.prj.
- In the IDDE "Project"
window <Control+Shift+P> right click the project dmc_wxmsw.prj
and select "Settings..."
from the menu
- Edit the settings as shown below:







- Click on OK to save the settings.
- Rebuild the project.
- In the <wxWindows
directory>\src directory there are also the following
subdirectories:
Those directories contain also dmc_<name>.prj
files which needs to be build. For every project in those directories
you have to adjust the project setting before you build them. Edit the
Project Settings as above except for those three pages listed below.


Change the
"Compiler Output Directory" according to
the project.

- Rebuild the projects.
Building the samples with the
DigitalMars IDDE
To build the samples in the
<wxWindows
directory>\samples directory, create projects with
settings like the
dmc_wxmsw.prj
in the
<wxWindows
directory>\samples\<sample> directory and
change the
target to
exectable.
Change the
"Include Directories" as below.
Also add the following libraries to the project:
This file is also included in the
dmcpatchkit.zip
Building wxWindows-2.4.1 with
DigitalMars and MAKEFILE's
- Open a command prompt window.
- Make sure the DigitalMars compiler bin directory is in the search
path.
- Make sure the WXWIN environment variable is set to the
wxWindows-2.4.1 install directory.
To check this type in
the command prompt window:
c:\>set
When
the path or enviroment is not set, you may use the following commands
to set them. But be aware they are ONLY set for this
particular command prompt window session! (assuming P:\eng\wxwin is the wxWindows
directory and c:\dmc the compiler
directory).
Setting the
search path to include c:\dmc\bin:
c:\>set
path=c:\dmc\bin;%path%
and
setting the enviroment variable WXWIN:
c:\set WXWIN=P:\eng\wxwin
- Change directory to:
cd %WXWIN%\src\msw
- There should be a makefile named: makefile.dmc.
Make this file
with this command:
make -f makefile.dmc
- When the build is finished goto:
cd ..\..\lib\dmc
there should be the following files:
- dmc_wxmsw.lib
- dmc_zlib.lib
- dmc_regex.lib
- dmc_png.lib
- dmc_jpeg.lib
- dmc_tiff.lib
If one or more are missing, something went wrong.
- If the files are there goto:
cd
..\..\samples\minimal
and type:
make -f makefile.dmc
- If everthing goes ok the minimal sample is build. Try by typing:
minimal.exe
When you receive link errors like:
link /NOI /DE /PACKF /XN /NT /EXET:NT /SU:WINDOWS /A:512 /RC :C:\wxWindows-2.4.1\samp
les\minimal\minimal.res C:\wxWindows-2.4.1\samples\minimal\minimal.obj , C:\wxWindows
-2.4.1\samples\minimal\minimal.exe ,, C:\wxWindows-2.4.1\lib\dmc\ dmc_wxmsw.lib dmc_z
lib.lib dmc_regex.lib dmc_png.lib dmc_jpeg.lib dmc_tiff.lib gdi32.lib advapi32.lib uu
id.lib shell32.lib ole32.lib comctl32.lib comdlg32.lib ws2_32.lib
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
shell32.lib
Warning 2: File Not Found shell32.lib
ws2_32.lib
Warning 2: File Not Found ws2_32.lib
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(window)
Error 42: Symbol Undefined _DragQueryFileA@16
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(window)
Error 42: Symbol Undefined _DragFinish@4
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(window)
Error 42: Symbol Undefined _DragQueryPoint@8
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(window)
Error 42: Symbol Undefined _DragAcceptFiles@8
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(gdiimage)
Error 42: Symbol Undefined _ExtractIconExA@20
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(gdiimage)
Error 42: Symbol Undefined _ExtractIconA@12
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(utils)
Error 42: Symbol Undefined _WSACleanup@0
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(utils)
Error 42: Symbol Undefined _gethostbyaddr@12
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(utils)
Error 42: Symbol Undefined _gethostbyname@4
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(utils)
Error 42: Symbol Undefined _gethostname@8
C:\wxWindows-2.4.1\lib\dmc\dmc_wxmsw.lib(utils)
Error 42: Symbol Undefined _WSAStartup@8
--- errorlevel 11
C:\wxWindows-2.4.1\samples\minimal>
Your DigitalMars installation is missing some system import libraries.
Don't panic just type the following
commands to create them:
make -f makefile.dmc clean
make -f makefile.dmc win32libs
make -f makefile.dmc
If there were no errors, the sample is build succesfully, so give it a
try!.
This link problem could also occur while compiling other samples or
project with DigitalMars. Just take a look in the file
<wxWindows
directory>\src\makeprog.dmc
to see how you can create your own import libs
from system dll's. Also see this faq and this page.
- There are a lot of other samples to try out, a few of them
have
already digitalmars makefiles (makefile.dmc) a few of them don't but it
is really easy to create the missing ones. Just take a look at the
minimal sample makefile to get an idea.
You want a quick and dirty way to build all the samples which have a
makefile.dmc already?
Try this:
cd %WXWIN%\samples
for /R . %1 in (*.dmc) do make -f %1
This should build quite a few samples. You are not satisfied yet? OK
one last trick to build samples wich do not have a makefile.dmc yet but satisfy certain requirements:
cd %WXWIN%\samples
for /R . %1 in (*.rc) do if not exist %~dp1\makefile.dmc make
TARGET=%~n1 TARGETDIR=%~dp1 -f %WXWIN%\samples\sample.dmc
Good Luck.