15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Dependency Debugging?

Greg Tighe -- tie1on@ix.netcom.com
Tuesday, June 11, 1996

MFC/MSVC 4.0, Win95

I have a rather huge app which we have moved over to MSVC 4.0.  It =
consists of multiple libraries which need to be built separately and =
then linked into the final application.  We used to build these =
libraries batch-style from the DOS command line and each library had its =
own makefile.  Now we have rolled this into one big honking Project =
Makefile and everything works OK except for one smal glitch:

After I've successfully built all the libraries and linked the app via =
the MSVC 'Build' command, when I attempt to run the executable from =
within the Developer Studio it informs me that "One or more files are =
out of date or do not exist.  Would you like to build them?"  If I say =
'Yes' then it doesn't actually build anything but proceeds to run my =
executable.

After a successful build if I invoke the 'Build' command again without =
changing anything I get the following:

--------------------Configuration: lib1 library and include - Win32 =
Debug--------------------
--------------------Configuration: lib2 library and include - Win32 =
Debug--------------------
--------------------Configuration: lib3 library and include - Win32 =
Debug--------------------
--------------------Configuration: myapp executable and include - Win32 =
Debug--------------------
myapp.exe - 0 error(s), 0 warning(s)

So it thinks it has files out of date in those three subprojects and in =
the main project, but when attempting to rebuild each it turns out that =
nothing needs to be rebuilt.

My question is: Is there a way of debugging the dependecy rules that the =
makefile is using so that I can determine exactly which file(s) MSVC =
thinks is out of date or does not exists so that I can track this =
problem down?

-Greg Tighe
tie1on@ix.netcom.com




Jeff Shanholtz -- JShanholtz@msn.com
Wednesday, June 12, 1996

[Mini-digest: 2 responses]

MSVC 1.52c, Win95

>> After I've successfully built all the libraries and linked the app via =
>> the MSVC 'Build' command, when I attempt to run the executable from =
>> within the Developer Studio it informs me that "One or more files are =
>> out of date or do not exist.  Would you like to build them?"  If I say =
>> 'Yes' then it doesn't actually build anything but proceeds to run my =
>> executable.

I've seen the same thing in msvc 1.5; I use nmake to build usually. I haven't 
taken the time to figure out what the problem is because as best as I can tell 
the IDE builder is mistaken (or nmake is not updating some flag).

Jeff Shanholtz
Enertech Consultants
-----From: Roger Onslow/Newcastle/Computer Systems Australia/AU 

Strange... maybe you need to rebuild you dependancies (Build|Update All 
Dependencies)???

>After a successful build if I invoke the 'Build' command again without
>changing anything I get the following:
>
>--------------------Configuration: lib1 library and include - Win32 
Debug--------------------
>--------------------Configuration: lib2 library and include - Win32 
Debug--------------------
>--------------------Configuration: lib3 library and include - Win32 
Debug--------------------
>--------------------Configuration: myapp executable and include - Win32 
Debug--------------------
>myapp.exe - 0 error(s), 0 warning(s)
>
>So it thinks it has files out of date in those three subprojects and in the
>main project, but when attempting to rebuild each it turns out that nothing
>needs to be rebuilt.

Not quite right....
They are just message that MSVC displays as it checks ,and a final message 
saying that the .EXE is upto date.
If this is all you're getting then there ain't no problem... it's just telling 
you all is well
Unless you get a "Linking..." line, then MSVC isn't doing any work.

>My question is: Is there a way of debugging the dependecy rules that
>the makefile is using so that I can determine exactly which file(s) MSVC
>thinks is out of date or does not exists so that I can track this problem down?

I have similar "problem" with a large app, but I don't use multiple libraries, 
so that is probably not a factor.

In my case, if I do a build (OK), get out and come back later (without making 
changes) and rebuild again (just to make sure) it does another link
I'm not sure, but I think ONE of these is the reason:
 MSVC keeps track of builds rather than using the actual file times and gets 
confused
 MSVC falsely dates the EXE and on next build it appears out of date (this is 
more likely reason)

The extra link I get is only a minor annoyance for me, so I haven't chased it 
any further as yet, but will have a look when I have some spare time.

Roger Onslow
RogerO@compsys.com.au





Dale Wilson -- dale@drant1.dra.com
Thursday, June 13, 1996

[Mini-digest: 2 responses]


>> After I've successfully built all the libraries and linked the app via =
>> the MSVC 'Build' command, when I attempt to run the executable from =
>> within the Developer Studio it informs me that "One or more files are =
>> out of date or do not exist.  Would you like to build them?"  If I say =
>> 'Yes' then it doesn't actually build anything but proceeds to run my =
>> executable.

If you turn off incremental linking the problem will go away.  There seems 
to be a case in which MSVC can incremental link w/o changing the file 
date/time (possibly if it decides that no changes are necessary???) leaving 
an object file with an newer date than the exe.

Dale@dra.com

-----From: "Greg Tighe" 

> -----From: Roger Onslow/Newcastle/Computer Systems Australia/AU 
> 
> Strange... maybe you need to rebuild you dependancies (Build|Update All 
> Dependencies)???
> 
No, that was one of the first things I tried...

> Not quite right....
> They are just message that MSVC displays as it checks ,and a final message 
> saying that the .EXE is upto date.
> If this is all you're getting then there ain't no problem... it's just telling 
> you all is well
> Unless you get a "Linking..." line, then MSVC isn't doing any work.
> 
> In my case, if I do a build (OK), get out and come back later (without making 
> changes) and rebuild again (just to make sure) it does another link
Yes, I've seen that with smaller projects also.  However, in this 
case even though it relinks unnecessarily on the second 'Build' 
command, if you forego the second 'Build' it doesn't prompt you to 
rebuild.

My problem is that no matter how many times in a row I press the F7 
('Build') key (with nothing being rebuilt,) as soon as I hit the 'F5' 
key to run my app it prompts me that files are missing/out of date.

	-Greg Tighe
	Applied Intelligent Systems, Inc.
	Ann Arbor, MI
	gdt@aisinc.com



George Roberts X3706 page 0571 -- ROBERTS@RATVAX.dnet.teradyne.com
Monday, June 17, 1996


>> After I've successfully built all the libraries and linked the app via =
>> the MSVC 'Build' command, when I attempt to run the executable from =
>> within the Developer Studio it informs me that "One or more files are =
>> out of date or do not exist.  Would you like to build them?"  If I say =
>> 'Yes' then it doesn't actually build anything but proceeds to run my =
>> executable.

I had the same problem.  It turned out the cause had to do with my server.
although the time was correct on my pc and the server, the time *zone* was
screwed up on one of them and set to pacific time instead of eastern time.
Everytime a file was updated from my pc to the server, the time would be
off by 3 hours.  This can cause make to rebuild because it thinks the
.exe is older than an .obj or library.

- George Roberts
george.roberts@teradyne.com




| Вернуться в корень Архива |