HOWTO: Build Exchange Samples Using Visual C++ Projects

Last reviewed: July 31, 1997
Article ID: Q172198
The information in this article applies to:
  • Exchange Development Kit (EDK)
  • Microsoft Visual C++, 32-bit Editions, version 5.0

SUMMARY

The Platform SDK (Software Development Kit) Exchange Samples all have makefiles and can be built by running nmake from the command window. If you are modifying the sample code or wish to include it in an existing project you may need a Microsoft Visual C++ project to build an Exchange sample. To create or modify Microsoft Visual C++ projects to build Exchange samples follow the steps outlined below.

MORE INFORMATION

Steps to Build Samples

  1. Change to the directory containing the sample code and verify that you can build the sample using nmake from the command line. The Exchange sample makefiles build a debug version by default. If you want to create a retail build, use the following:

           nmake BLDTYPE=Retail
    

    This step verifies that you have everything needed to build the sample and generates a win32 subdirectory tree under the sample code directory, which contains files that you will use later.

  2. Make sure you have set up Microsoft Visual C++ to use the Platform SDK include and lib directories. Assuming you have installed the SDK in MSSDK, you can set these by selecting Options from the Tools menu, selecting the Directories tab, adding MSSDK\Include to the Include files list of directories and adding MSSDK\Lib to the Library files list of directories.

  3. Select Settings from the Project menu and select the C/C++ tab. Select the "Code Generation" category, select Debug Multithreaded DLL (or Multithreaded DLL for a release build) for the run-time library.

  4. Add the sample files to the project (.c, .cpp, .rc and .def). If the sample project contains .mc (message compiler) files, you need to add the MC generated header (.h), resource (.rc) and binary (.bin) files to the sample code directory. If you ran nmake in step 1, the necessary files are in the Win32/Debug or Win32/Release subdirectories created in step 1.

  5. The Win32/Debug or Win32/release subdirectory should contain a libfiles.lst file that lists all the .lib files needed to build the project. You should read this file and add all the .lib files listed that are not already present in the "Object/library modules" box on the Link tab of the Project Settins dialog box (select Settings from the Project menu). Checking "Ignore all default libraries" may avoid LNK4098 warning messages in some samples.

You should now be able to build the sample using the Microsoft Visual C++ project.

Keywords          : EDKAPI
Version           : WINDOWS:; WINDOWS NT:5.0
Platform          : NT WINDOWS
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.