Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VC++ ( project builds with no reason )

Posted on 1998-08-24
2
Medium Priority
?
190 Views
Last Modified: 2010-04-01
When i build a certain project. it compiles some of the files though i don't do anything between the builds.
( I"ve built the project than immedietly built it again and again. and each time it compiled some of the files).
Is it a bug ? Is there a workaround but to create the project from beginning and move the code ?
how can i know for a specific file which are it's dependancies ?

0
Comment
Question by:hed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1171044
I've had this problem.  There may be more than one reason for the problem.  


QUESTION

1. Did you ever
(i) Set your clock forward (even if you set it back later)
(ii) Get the files from another PC
(iii) Transfer files across a network or via e-mail or via server directory

If the answer to any of the above is yes - then this is probably what has happened :-

1. The source (or header) date of the file is AHEAD of the current PC clock.  Therefore the compiler's build/make assumes you have always changed the file.
2. Even if you edit a file once in VC, it doesn't always seem to always set the date back.

The soln in my case was to
1. Exit VC
2. Check file dates in DOS, for every .h/.cpp/.inl/.c/.rc file that had a future date, open it in EDIT and save back without changes (to reset the file date to current tme)
3. Delete all intermediate files - objs, exes, pchs, etc.
4. Restart VC and rebuild all.  After this it was okay.


There doesn't seem to be a compile bug, it relates to how the compiler/make works (it compares the date of output files with input files, so if input files have future dates, the output files will always appear out of date).

There does seem to be an annoying an intermittent bug/feature with setting the file date stamp back in VC.
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 80 total points
ID: 1171045
I've had this problem.  There may be more than one reason for the problem.  


QUESTION

1. Did you ever
(i) Set your clock forward (even if you set it back later)
(ii) Get the files from another PC
(iii) Transfer files across a network or via e-mail or via server directory

If the answer to any of the above is yes - then this is probably what has happened :-

1. The source (or header) date of the file is AHEAD of the current PC clock.  Therefore the compiler's build/make assumes you have always changed the file.
2. Even if you edit a file once in VC, it doesn't always seem to always set the date back.

The soln in my case was to
1. Exit VC
2. Check file dates in DOS, for every .h/.cpp/.inl/.c/.rc file that had a future date, open it in EDIT and save back without changes (to reset the file date to current tme)
3. Delete all intermediate files - objs, exes, pchs, etc.
4. Restart VC and rebuild all.  After this it was okay.


There doesn't seem to be a compile bug, it relates to how the compiler/make works (it compares the date of output files with input files, so if input files have future dates, the output files will always appear out of date).

There does seem to be an annoying an intermittent bug/feature with setting the file date stamp back in VC.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

618 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