Copying of projects

In VC++, when I copy a project consisting of several modules to another directory all the files are not automatically included. I have to often manually include them. Why does this happen and how do I solve this?
Who is Participating?
TheGrinchConnect With a Mentor Commented:
In your project settings, make sure all paths (especially: C++,preprocessor) are defined relative to the directory where the dsp file resides. Do the same for any library files defined. You may already have it this way.

Also make sure you copy ALL the relevant directories. You can't just copy the project directory and not copy the 'res' directory, for example.
How are you copying the project?
You need to copy the project file as well.  

Or, if you already have a project file, and you want to copy certain classes, use the Component Gallary to export your classes, and then import them into the project.  Nice thing about that is that it copies the headers files, implimentation files, and even the resources for those classes!
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

rissamceoAuthor Commented:
Basically suppose I had a project in
C:\My Projects\....(consisting of many modules along with their source code and  .mdp files)

I simply Ctrl+C on that directory
and then
Ctrl+V to get "Copy of My Projects"
and then changed the name to "newProject"
Then when I opened the files of a particular module in the project window not all of them could be opened. I had to manually include some of the files by
Insert into project....

This is because VC++ sometimes uses absolute paths for the location of  project data,  thus an attempt to move the files will fail unless the location of the source/sub project files are stored relative its project file. I have in the past tried to get round this by employing an envirnoment variable to indicate the relative source position of my project files
e.g. %MySource%/myproject.dsp but vc++ does not expand the variable, so this idea failed.
look at : Tools->Options...->Directories and add your new project's path.
No comment -- I just forgot to check "email notify".
Grinch, you dont have to place a comment to use "email notify". Just tick the box and submit
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.