Solved

Copying of projects

Posted on 1998-10-20
8
255 Views
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?
0
Comment
Question by:rissamceo
8 Comments
 
LVL 3

Expert Comment

by:arunm
ID: 1175655
How are you copying the project?
0
 

Expert Comment

by:dirty_dog
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!
0
 

Author Comment

by:rissamceo
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....


0
 
LVL 3

Expert Comment

by:arunm
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.
 
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Expert Comment

by:arnond
ID: 1175659
look at : Tools->Options...->Directories and add your new project's path.
0
 
LVL 1

Accepted Solution

by:
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.
0
 
LVL 1

Expert Comment

by:TheGrinch
ID: 1175661
No comment -- I just forgot to check "email notify".
0
 
LVL 3

Expert Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now