HOWTO: Build Exchange Samples Using Visual C++ Projects

ID: Q172198

The information in this article applies to:

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          : kbAPI kbEDK kbMsg 
Version           : WINDOWS:; WINDOWS NT:5.0
Platform          : NT WINDOWS
Issue type        : kbhowto

Last Reviewed: August 2, 1997