Edit, Nov 19, 2011
NOTE: this post is out of date. Instead, please see the project here:
DM plugin - serial communication
This project uses relative paths everywhere, and sets output filenames dynamically based on the project name. To use it, extract/sync the github repository to an installation of the DMSDK, then rename the project in Visual Studio. You should be able to safely rename the project folder without breaking anything.
======================= Original post below ===================================
Yes, VS 2003 is out of date. I use it to compile C++ extension plugins for Gatan Digital Micrograph (DM), which we use to control our microscopes and acquire/process data. The SDK for DM is designed for Visual Studio 2003 (or older).
Part of the problem of doing something that very few others do is that the documentation is usually poor. This is very much the case with the SDK.
Here was my problem:
- I don't know how to create a new project and have it compile. The SDK is sufficiently complicated and different from any standard Visual Studio project that it is difficult to take this path.
- I don't know how to rename my VS 2003 project files without breaking the project. Thus, I am unwilling to distribute the source code to my project, since it is named something completely unrelated.
Here's my solution:
- In Windows Explorer:
- Rename the project folder in the filesystem.
- Rename the .sln and .rc files in the project folder. DO NOT rename the .vcproj file.
- Open the project by picking the .sln file to open.
- Rename the project in the solution explorer (right click, and select rename)
- Select the project in the solution explorer, and then click the File menu. Select Save as... and enter the new filename for your .vcproj file. You can now delete the old .vcproj file from the folder.
- For old source files to be excluded, right click them in the solution explorer, and click remove.
- For new files to be included, right click on the project or folder in the solution explorer, and select Add... -> Add existing item...
- In the project properties (right click the project, and select properties):
- Under C/C++, pick the Precompiled Header options, and rename the Precompiled header file appropriately (not entirely necessary, this is a cosmetic change since this file gets (re)generated automatically when necessary)
- Under Linker, in the General options, change the Output File.
- Under Linker, Debugging: update the "Generate Program Database File" option
- Under Linker, Advanced: update the "Import Library" option
Now you should no longer have any files popping up with the old name.
Good luck with your DM plugins and renamed VS 2003 projects!