1. Home
  2. Computing & Technology
  3. C / C++ / C#

How to Compile Programs with Microsoft Visual C++ 6

By David Bolton, About.com

8 of 8

Manipulating DSP and DSW Files Directly

DSP and DSW Files

All Project settings are kept in a .dsp project file. This includes all configuration information and it's quite readable. Ignore the 3rd line # ** DO NOT EDIT **", but please do take care. Always close the workspace in Visual C++ and make a backup copy before editing the .dsp file.

You can edit a project file using notepad or any text editor and it can be faster to make changes than by using the Settings dialog. For instance you can see where the Debug and Release Directories are defined, and changing those is easy. Adding extra source or header files is not a hard task. Just add these three lines below to the .dsp to add newfile.cpp to your Source Files folder.

# Begin Source File
SOURCE=.\newfile.cpp
# End Source File

Copying DSP and DSW Files

It's easy to copy .dsp and .dsw files into a new folder. If you are keeping the same project name then there's no need to edit the .dsw file.

If the project has another name, you'll need to edit the .dsp and change all instances of the old name to the new. Also I've found that the Precompiled headers setting can cause problems. You need to load the project, and change the "precompiled headers" setting on the C/C++ tab (choose "Precompiled Headers" on the category Combo) to Create Precompiled header file the first time you build a project. After that change it to "use precompiled header file" (.pch).

That completes this lesson on compiling with Visual C++ 6.

Explore C / C++ / C#
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
  4. C
  5. C Tutorials
  6. Manipulating DSP and DSW Files Directly

©2009 About.com, a part of The New York Times Company.

All rights reserved.