

                      Instructions for Compiling MIME++


Win32 - Microsoft Visual C++ 5
------------------------------

1. Browse through the file src\mimepp\config.h.  Read the comments in that
   file and make changes so that the compile time options are configured as
   you want them.

2. Open a Command Prompt window (NT) or an MS-DOS window (Windows 95).
   From the root directory of the distribution, type

     nmake /F makefile-vc

   That should build a total of nine libraries: three libraries in three
   different configurations. The three libraries are:

      mimepp_core.lib  - basic MIME classes
      mimepp_core.dll

      mimepp_util.lib  - other classes and functions for various utilities,
      mimepp_util.dll    such as base64, quoted-printable, etc

      mimepp_net.lib   - SMTP, POP, NNTP
      mimepp_net.dll

   The three configurations are:

      dbg   - Libraries for tracking down bugs
      dev   - Libraries for normal development.  Assert statements are enabled
              for performing runtime checks
      rel   - Libraries for using to build a production version.  Assert
              statements are disabled.  The libraries always try to recover
              from errors

   Each configuration is in a separate directory.  The directories are
   dbg, dev, and rel.

3. When you use MIME++ in one of your projects, you must change the setup
   so that the compiler will search the src directory for header files.
   You must also specify mimepp_core.lib, and possibly mimepp_util.lib 
   and mimepp_net.lib, to the linker.  The *.dll files must be in your
   path to run the executable created by your project.

4. Optionally, compile the example programs.  Change to the directory
   examples, then type

     nmake /F makefile-vc

   That will make five example programs: exampl01.exe exampl02.exe
   exampl03.exe exampl04.exe exampl05.exe.

------------------------------------------------------------------------------

UNIX
----

1. Browse through the file src/mimepp/config.h.  Read the comments in that
   file and make changes so that the compile time options are configured as
   you want them.  Note that some of the options are only relevant for Win32.

2. In the root directory of the distribution, find the makefile that applies
   to your operating system.  Makefile-unix is a generic makefile for UNIX,
   but you may find one that is more specific to your operating system, such
   as Makefile-linux.  Edit the makefile for your compiler; specifically,
   you may need to change a compiler flag to enable or disable exception
   handling.

3. Assuming Makefile-xxx is the makefile for your system, type

    make -f Makefile-xxx

   That should build a total of nine libraries: three libraries in three
   different configurations. The three libraries are:

      libmimepp_core.a  - basic MIME classes

      libmimepp_util.a  - other classes and functions for various utilities,
                          such as base64, quoted-printable, etc

      libmimepp_net.a   - SMTP, POP, NNTP

   The three configurations are:

      dbg   - Libraries for tracking down bugs
      dev   - Libraries for normal development.  Assert statements are enabled
              for performing runtime checks
      rel   - Libraries for using to build a production version.  Assert
              statements are disabled.  The libraries always try to recover
              from errors

   Each configuration is in a separate directory.  The directories are
   dbg, dev, and rel.

4. When you use MIME++ in one of your projects, you must change the setup
   so that the compiler will search the src directory for header files.
   You must also specify -lmimepp_core, and possibly -lmimepp_util and
   -lmimepp_net, to compiler driver to build the executable. 

   If you want to "install" the library, you can copy the src/mimepp
   directory to a standard place:

     cp -R src/mimepp /usr/local/include

   and copy the archive libraries to a lib directory:

     cd dev
     cp libmimepp_core.a libmimepp_util.a libmimepp_net.a /usr/local/lib

5. Optionally, compile the example programs.  Change to the directory
   examples, find a makefile that applies and edit it if necessary.
   Assuming Makefile-xxx is the makefile for your system, type

     make -f makefile-xxx

   That will make five example programs: exampl01 exampl02 exampl03
   exampl04 exampl05.

------------------------------------------------------------------------------

Customizing
-----------

If you don't like using makefiles, and you want to build the library using
a project in an IDE, or if you want to build your own makefile, the following
instructions should be helpful.

By default, the MIME++ library is divided into three libraries: a core
library, a util library, and a net library.  The files that belong to each
library are listed here:

core
  address.cpp
  addrlist.cpp
  body.cpp
  bodypart.cpp
  bounds.cpp
  boyermor.cpp
  datetime.cpp
  disptype.cpp
  dw_date.cpp
  dw_mime.cpp
  entity.cpp
  except.cpp
  field.cpp
  fieldbdy.cpp
  group.cpp
  headers.cpp
  mailbox.cpp
  mboxlist.cpp
  mechansm.cpp
  mediatyp.cpp
  message.cpp
  msgcmp.cpp
  msgid.cpp
  param.cpp
  string.cpp
  system.cpp
  text.cpp
  token.cpp

util
  binhex.cpp
  dw_cte.cpp
  uuencode.cpp

net
  nntp.cpp
  pop.cpp
  protocol.cpp
  smtp.cpp

If you prefer to compile all files into just one library, you can do this
easily in UNIX, or if you build static libraries for Win32.  If you want
to build one DLL for Win32, you will have to redefine these macros:
DW_CORE_EXPORT, DW_UTIL_EXPORT, DW_NET_EXPORT.  Lines commented out in
config.h show you how to do this.

There are three configurations, defined by macros, for each library.
The configurations and the macros required to compile them are as follows:

DW_DEBUG_VERSION        - assert macros defined, extra functions for debugging

DW_DEVELOPMENT_VERSION  - assert macros defined

DW_PRODUCTION_VERSION   - assert macros not defined, tries to recover where
                          an assert macro would abort

