Copying of projects

Posted on 1998-10-20
Last Modified: 2011-04-14
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?
Question by:rissamceo

Expert Comment

ID: 1175655
How are you copying the project?

Expert Comment

ID: 1175656
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!

Author Comment

ID: 1175657
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....

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Expert Comment

ID: 1175658
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.

Expert Comment

ID: 1175659
look at : Tools->Options...->Directories and add your new project's path.

Accepted Solution

TheGrinch earned 20 total points
ID: 1175660
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.

Expert Comment

ID: 1175661
No comment -- I just forgot to check "email notify".

Expert Comment

ID: 1175662
Grinch, you dont have to place a comment to use "email notify". Just tick the box and submit

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MSVCR80.dll crash 2 140
VS2015 compilation and missing DLLs 9 147
gdb doesn't stop on breakpoint 2 68
Error creating a new C++ project in ,net 20 36
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question