943,973 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 7268
  • C++ RSS
Jun 22nd, 2006
0

Help Me Change a VC++6 Project Name

Expand Post »
I have created a project in Visual C++ 6.0 called qcard4. This project was started by creating a new single document project and copying and pasting code from qcard3 into the files. I have been gradually improving and modifing this code from qcard1. I tried to produce the qcard3 code by just making it dependant on qcard2. I don't know why but I lost the ability to use or recompile the qcard2 project when I did this. I didn't want that to happen, it just did. Now I have all the files for qcard2 but I can't modify it. It's useless to me as stand alone code.

All these projects have a different purpose but require similar code in a lot of respects. Once I get them working I like to leave them alone.

In c and c++ this was not a problem. All I had to do was copy the source into a different folder (directory) and rename it. then I could do anything I wanted to it without effecting the allready working program.

So far in Visual c++ I have been unable to do this. I have looked for a way to rename a project but apparently there is no way to do this. I would like to have separate project folders for each version so that once they are working (debugged) I can leave them alone. I can copy the whole folder and rename it, but the individual files still carry the old project name.

I would like to create a project called qcard5 (in a seperate folder) starting with the qcard 4 source code, but I don't want to lose what I allready have working in the qcard4 software. This project will perform totally different screen graphics displays by using modified qcard4 code. What is my best approach for doing this?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
huffstat is offline Offline
19 posts
since May 2006
Jun 22nd, 2006
0

Re: Help Me Change a VC++6 Project Name

1. start a new empty project and call it qcard5.

2. Copy the *.cpp and *.h files from qcard4 into qcard5 directory

3. select menu Project --> Add To Project --> Files and select the files you want to add to the project.

Mission accomplished.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Jun 22nd, 2006
0

Re: Help Me Change a VC++6 Project Name

Quote originally posted by Ancient Dragon ...
1. start a new empty project and call it qcard5.

2. Copy the *.cpp and *.h files from qcard4 into qcard5 directory

3. select menu Project --> Add To Project --> Files and select the files you want to add to the project.

Mission accomplished.
Please understand that I am not trying to be funny here.
I tried to create an "empty project" but the selections the project wizard gave me did not include this phrase. It was also not available in the help index or the help search. Both empty and project were in the index but not together. The only thing I could create with the project wizard was far from empty as I need an SDI. Please be more specific about what you mean by "empty project"
Reputation Points: 10
Solved Threads: 0
Newbie Poster
huffstat is offline Offline
19 posts
since May 2006
Jun 22nd, 2006
0

Re: Help Me Change a VC++6 Project Name

File --> New --> Win32 Console Application --> Wizzard displays a dialog with 4 radio buttons, the first one is An empty project.

I have VC++ 6.0 Pro edition. I don't know if other editions (such as standard edition) have that menu item or not. If not, then just create a console application, delete all the *.cpp and *.h files, then copy from old to new project.

If you want an MFC project, then its a little more complicated, but basically the same. Create a new mfc project and copy files from old to new project, replacing any files that the new project contains that have the same filename. you may have to rename some of the files after copying.
Last edited by Ancient Dragon; Jun 22nd, 2006 at 1:17 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Jun 23rd, 2006
0

Re: Help Me Change a VC++6 Project Name

Quote originally posted by Ancient Dragon ...
File --> New --> Win32 Console Application --> Wizzard displays a dialog with 4 radio buttons, the first one is An empty project.

I have VC++ 6.0 Pro edition. I don't know if other editions (such as standard edition) have that menu item or not. If not, then just create a console application, delete all the *.cpp and *.h files, then copy from old to new project.

If you want an MFC project, then its a little more complicated, but basically the same. Create a new mfc project and copy files from old to new project, replacing any files that the new project contains that have the same filename. you may have to rename some of the files after copying.
I have tried this approach after finding the empty project in the win console application. I generated 18 link errors of which 16 have been resolved by 1-selecting use mfc as a shared dll and 2-adding my dll library file name, both in the link options.
The remaining link errors appear to be a single problem of which there are about 20 different solution possibilities. I'm working on this but any quick solution ideas would be appreciated.

[compiler output]
Deleting intermediate files and output files for project 'Qcard5 - Win32 Debug'.
--------------------Configuration: Qcard5 - Win32 Debug--------------------
Compiling resources...
Compiling...
NewGame.cpp
Qcard4.cpp
Qcard4Doc.cpp
Qcard4View.cpp
shuffle2.cpp
StdAfx.cpp
MainFrm.cpp
Linking...
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/Qcard5.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Qcard5.exe - 2 error(s), 0 warning(s)
[/compiler output]
Reputation Points: 10
Solved Threads: 0
Newbie Poster
huffstat is offline Offline
19 posts
since May 2006
Jun 23rd, 2006
0

Re: Help Me Change a VC++6 Project Name

A Win32 Console Application expects main to be defined somewhere.
Attached Thumbnails
Click image for larger version

Name:	Project-VSVC6.jpg
Views:	55
Size:	112.7 KB
ID:	2092  
Last edited by Dave Sinkula; Jun 23rd, 2006 at 10:12 am.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Jun 23rd, 2006
0

Re: Help Me Change a VC++6 Project Name

since you have MainFrm.cpp I appears that the original program was MFC. You don't want to create a win32 Console application for that, but create an MFC application just like you did the original program, but give it the new program name. After that you should be able to delete all files from the project, copy the files from the old project directory into the new directory, then add the files you copied into the new project -- menu Project --> Add To Project --> Files.

You will probably want to keep the <project name>.cpp and <project name>.h files that the wizard created for the new project.

Here is a utility program that is supposed to rename the project. I have never used it so use it at your own risk. You will want to read the comments at the end of the article.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Help with Mortgage Calculator
Next Thread in C++ Forum Timeline: arrays





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC