|
As far as I am aware the default option in Visual Studio is to build only those modules that have changed since the last build, or which are dependent on some other file which has changed. All I can suggest is that you look closely at your project settings in the C/C++ section, and also all the dependencies for the files in question. Without seeing your actual project it's impossible to be more specific.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
I totally agree with Richard MacCutchan's statement. I would be hard to analyze without peeking into your project organisation.
Can you just compile the modified cpp alone (you can press ctrl+F7 or right-click on that cpp in the solution view and press compile) and see what other cpp's are compiling. In this way you can find the dependency of those cpp's with the current one
|
|
|
|
|
Another alternative is the http://www.dependencywalker.com/[^]
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
i've had Visual Studio do that to me before. there's usually a file somewhere in there with a bad mod time.
i always end up having to modify everything to get things back in sync.
|
|
|
|
|
Are you sure you haven't got one or two files you're including just about everywhere, either directly or indirectly? In my experience this is the biggest killer of C++ app building time in the known universe. And beyond. Years ago it was common to have forbidden files that people wouldn't touch because you'd end up with 6 hour compilations if you did.
MFC apps are really prone to this type of coupling as the framework is a bit 1990s and encourages implementation inheritance everywhere.
If Chris L.'s comment about timestamps doesn't do it for you have a good what at what's including what and how you can break the dependencies.
"Exceptional C++" by Herb Sutter and "Large Scale C++ design" by John Lakos go over how to reduce dependencies. Actually Lakos book is about nothing else and is a bit out of date so try "Exceptional C++" first.
Cheers,
Ash
|
|
|
|
|
Hi person that voted this a 1. Any chance you could explain to me how I failed to do anything to help the conversation along? I'm particularly interested in knowing any factual errors I've made so I can learn from them and not make them again.
Cheers,
Ash
PS: I don't do revenge down voting in case you're worried about some form of reprisals.
|
|
|
|
|
I've seen this behavior when a source file got a wrong future date because it was edited when the date on the PC was set incorrectly.
After the date was corrected, the object file always appeared out of date since it never caught up with the source file from the "future".
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
|
|
|
|
|
Couple of things to consider:
Is your project set for minimal rebuild?
Are you using precompiled headers?
If answer to any of the above is no or I don’t know check the following:
Open the project's Property Pages dialog box.
Click the C/C++ folder.
Click the Code Generation property page.
Make sure the Enable Minimal Rebuild property is set to yes(/Gm).
Click on Precompiled header folder.
Make sure that Create/Use Precompiled header is set to Use. . . (/Yu)
Make sure that Create/Use PCH. . . is set to stdafx.h
You may also need to check all source files iif they are set for precompiled header use. You can turn this on/off for every file in the project.
Close the solution and delete .suo, .ncb files and Debug/Release directories, this will delete .idb (dependencies info file).
Load the project and choose rebuild.
Also check if any file in the project has the modification time set ahead of you local date/time (this may have been already addressed in one of the posts).
JohnCz
|
|
|
|
|
Thanks for the response.
This solved the problem: Close the solution and delete .suo, .ncb files and Debug/Release directories, this will delete .idb (dependencies info file). Load the project and choose rebuild.
You made my day 10% more efficient; which is big.
Thanks!
|
|
|
|
|
You are welcome, glad to be of help.
JohnCz
|
|
|
|
|
Hello Friends
I am having one text file storing some constant color data.
But I dont want to read it from Disk everytime when I am showing up all these color into Dialog.
I need a way that file get embed into project and when I open my color Dialog,it get read tht file and show up all colors.
Any Ideas?
Regard
Yogesh
|
|
|
|
|
there are many ways...
the simplest is to store the data as a static array of values:
const COLORREF clrs[] =
{
RGB(0,0,0), RGB(1,2,3), RGB(20,40,60), etc..
};
|
|
|
|
|
const char ColorData[] = " . . . Embed all your data here . . . . ";
That might be a start.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Currently, how do you store the data after the file is read ? in an array of "color constants" ?
could'nt you simply declare an array in the code and fill it ?
for example, we do something like this for color tables:
static colorStruct colorTable[] =
{
"Black", RGB( 0, 0, 0 ),
"Red", RGB( 255, 0, 0 ),
"Yellow", RGB( 255, 255, 0 ) ,
...
};
Watched code never compiles.
|
|
|
|
|
With a text file, just embed the content as a text variable to your source file:
static const char * lpszColorData = "<color data as text>";
and use the variable like the buffer used so far when reading from the file.
|
|
|
|
|
You can also use resources to embed text file into your project.
Say the name the text file is data.txt, then in the .rc file add
IDS_TEXT_DATA RCDATA DISCARDABLE "Data.TXT"
and in the resource.h give assign appropriate constant to it
#define IDS_TEXT_DATA 5555
|
|
|
|
|
That's it!
The only answer that actually answers the question as posed. While the other answers achieve (roughly) the same functionality, this is the only answer I'd be satisfied with if it were my question. Nice work.
What if the text file is 2000 lines long and created by some other program? The other answers will all require more work.
Admittedly the values will be stored as text, rather than binary - a size penalty, though otherwise this would be my preferred approach.
There are pros and cons to each method. Whom are we to assume that we understand the relevance of each of these to the project in question? Let alone give a response that doesn't answer the posed question...
|
|
|
|
|
The only fear I have is of security.
If the developer intends to store security critical information in this text file, then I think he is inviting trouble from the hackers/crackers or what ever, as the resource file is wide open for extraction and manipulation.
Like pointed rightly by you, it's up to the OP to chose the method
|
|
|
|
|
It really doesn't make much difference. In fact, with encryption this method could be more secure (difficult and time consuming to reverse - though one can still find/rip and use the decryption function as supplied in the exe along with the encrypted text).
There might be a difference of 5-10 mins in understanding the binary data as opposed to the (plain) text version using OllyDbg or (preferably) IDA Pro Advanced.
However, I don't see security as a consideration (nor was it mentioned) when storing colour values. :shrugs:
|
|
|
|
|
Hello Friends
Thanks EveryOne For their thoughtful consideration for my question.
But still I didnt Get my Answer.
Till Now, i am reading the file from disk and stroing it into Color Arrays.
Directly,i cant assign my RB Values to ColorArray as my File is Having more than 2000 lines and it can be changed later on As it is produced from Third party.
And Now,I dont want to keep this file on Disk for Security purpose even.
AS i Think,Would it be preferrable If i save color text file into Header file and add it into project and is ther any some way to get data into Structures by using CStdioFile or Some other way ?
Any Other Ideas ??
Thanks & Regards
Yogesh
|
|
|
|
|
Then Lakamraju's answer for you was perfect - The 2rd party just makes a file, which you refer to from your rc resource, and it gets built it.
This is less easy that the previous answers to work with, but it satisfies the requirements you've just written (and should have written in the original question - none of us are psychic. Well, maybe Carlo...)
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Hello
If i Use it like to embed in resource then My Question is that then Do we need text file on Disk when I use exe at other place ?
Regards
yogesh
|
|
|
|
|
Resources are built into the executable.
You don't need an icon file for your executable to have an icon at another place either.
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Thanks Carlo.
Regards
Yogesh
|
|
|
|
|
CFileVersionInfo fvi;
char szVer[ 512 ] = { 0 };
if( fvi.Open( _T( "Econovent.dll" )))
{
::wsprintf( szVer,
_T( "%d.%d.%d.%d" ),
fvi.GetFileVersionMajor(), fvi.GetFileVersionMinor(), fvi.GetFileVersionBuild(), fvi.GetFileVersionQFE() );
fvi.Close();}
It works perfect in win32, But when complied in x64 the "wsprintf", stops working. Are the a better solution that works in x64 and win32 at the same time.
I understand that i have change. I have tried but then its not working in win32 mode.
The code need to be old C-style version. I'm not native C/C++ i'm just trying to fixa a "bug".
|
|
|
|