• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

VS6 problem when MFC project is moved

I have a MFC project on a drive and copied it to a different dirve.

Then I renamed the original folder so there would be no chance of VS6 could reference the old drive/folders.

I then opened the project .dsw file and that seemed to go OK.

Then I did a "Clean" and Build All. Checked the time and date stamp of the new .obj and exe and it made sense.

When I start the debugger ir issued a message "One or more files are out of date or do not exist" ........ Would you like to build them?

Well the files do exist and they are new.

I checked the path in Project / Link and made sure it pointed to the new folder.
Recompiled and tried Debug again.,.. Same message.

I've moved projects before using the same procedure and never had a problem...  

What did I do wrong ?

0
hansw77041
Asked:
hansw77041
  • 9
  • 6
  • 4
  • +1
1 Solution
 
jkrCommented:
Open the .dsp file in a text editor and check whether it contains any references to the old location. VC++ sometimes has the nasty habit to place absolute paths there.
0
 
hansw77041Author Commented:
No hard coded paths..

I noticed these items do not have any path.

# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
0
 
AndyAinscowCommented:
Instead of clean - build how about a rebuild all.
OR Delete the DEBUG/RELEASE directory, then build.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
hansw77041Author Commented:
That was the first thing I tried.  
Although I deleted the contents of Debug/Release and rebuild ALL
The new obj's and EXE appear in the folder and the EXE works... !
It's just annoying to get that message each time.

Several years ago I had something similar and used Touch to make all files have current time date and that fixed that problem then.
By deleting and ReBuild ALL they files get the current time data so using touch would not accomplish anything...


I may export a .MAK and then have VS6 make a new project file from the MAK...
0
 
jkrCommented:
Hm, open your project properties, go to the "Debug" tab and check what file is listed as "Executable for Debug session"...
0
 
hansw77041Author Commented:
This is VS6..
I went to Project / Settings /Debug tab and then refreshed the path for the executeable.

It did not help same message.

I changed configuration to Release then Clean and Rebuild ALL  and it does the same thing...
0
 
AndyAinscowCommented:
Long shot (hope I remember vc6 correctly) - does it have a help file?  If yes then check the contents of the bat file, maybe there is a hardcoded path there.
0
 
hansw77041Author Commented:
I think you mean am I using a Pre-Compile batch file as a helper .

No not on this project.

I'll try the .MAK thing tonight...
0
 
AndyAinscowCommented:
Nope - creating a .hlp file.  Maybe I remember wrong but doesn't the default behaviour involve calling a bat file of the help compiler?
If you don't have a help file then it isn't relevant at all.
0
 
hansw77041Author Commented:
Yes this project is using a 68 page help file of type ,chm

In the App::Initinstance() I do this: (can't remember where I got this code snippet)

    CString strHelpFile = m_pszHelpFilePath;
    strHelpFile.Replace(_T(".HLP"), _T(".chm"));
    free((void*)m_pszHelpFilePath);
    m_pszHelpFilePath = _tcsdup(strHelpFile);

I tried commenting out the code and it did not fix the problem,
I looked for other paths in every Project settings and everything points to the correct path.


I just tried opening the project using the .MAK and it's still the same...

0
 
mahesh1402Commented:
>>I start the debugger it issued a message "One or more files are out of date or do not exist"

Make sure none of your files time/date are in the 'future' ( check your clock).

 Generally that's the cause...the compiler will notice the files time are in the future and attempt to compile them regardless if they need it or not...

Check your system time clock if its correct and not set forward/backward.

-MAHESH
0
 
hansw77041Author Commented:
Good one... you nailed it... one file had 29 August 2007 !
Thanks for the help
0
 
hansw77041Author Commented:
A note about my comment of using touch.... Had I done that on the source files it would have fixed the problem as it did years ago...
However my assumption was that touch would not help becasue I was doing clean and also deleting the contents of the Debug folder!
The issue was of course th date of the source...

Thanks for the help..
0
 
AndyAinscowCommented:
>>>Good one... you nailed it... one file had 29 August 2007 !


You said all you had done was copied the files AND you had checked the date/times of them in the original question.  

<Well the files do exist and they are new. >
0
 
mahesh1402Commented:
>>Well the files do exist and they are new.

Future and New :
As i said the compiler will notice the files time are in the 'future ' and attempt to compile them regardless if they need it or not.. may be it seems he verified it its new but NOT its in 'future' as he said 'one file had 29 August 2007' which is a month later.....

-MAHESH
0
 
AndyAinscowCommented:
My first thoughts when reading the problem - time stamp in future.

I guess jkr would also think the same BUT the questioner explicitly said he checked so I didn't mention that.

:-(
0
 
mahesh1402Commented:
thats probably cause of just 'checking Not Older'...

-MAHESH
0
 
hansw77041Author Commented:
Sometime the problem can be the person asking the question... as was the case this time.

As to the Quote about files being new:

Please quote in full context.!

Quote:
"Then I did a "Clean" and Build All. Checked the time and date stamp of the new .obj and exe and it made sense.
...
Well the files do exist and they are new. "
end Quote:

Note I did state obj and exe and NOT source... sounds stupid... OK so I made a mistake !

Anyway that statement should have been the prompt for a question such as ....  

Q) Did you check the time date stamp of the source files...?

Thanks for the help...  






0
 
AndyAinscowCommented:
I took the <Well the files do exist and they are new. > to be the source files - because that was what you were having problems with.
Ah well - it works now.
0
 
hansw77041Author Commented:
Andy,
Thanks for the help.
Yes but that was my mistake.... Using this stuff as little as I do I tend to forget things...
Had I used touch it would never have been as a question on EE!

I do appreciate your efforts and sorry I could not award points. You know the rules if someone nails it... they have to get the points...




0
 
mahesh1402Commented:
Note that Even if you check files date & stamps you could mess with your system clock, if that wrong you will get same errors, hence I suggested above to check your system clock along with date & stamps that are not in future.

-MAHESH
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 9
  • 6
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now