|
have you included the *.lib to the project?
Greetings.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Also make sure that particular file is not being used by any other application which is running while you are compiling this project.
Priya Sundar
|
|
|
|
|
Are you using precompiled headers? Is your precompiled header including "MyLibraryst.h"? You might need to make the path relative to stdafx.h instead of your .cpp file.
Florin Crişan
|
|
|
|
|
Hello!
I have an mfc view changing application with about 150 Views. Compile Time is about 45 Minutes using Visual Studio 2005 with a 3.06 HT Intel with 1 GB Ram.
Does anyone know what can speed up this procedure best. More CPUs, more powerful CPU or more ram or any other suggestions?
|
|
|
|
|
It must be a beast. I used to work on an App of about that magnitude (250 dialogs a dozen views, multiple scripting engines etc) and it took 45 mins to build on a Pentium 90. Have you considered dividing up the application so you don't have to rebuild all of it so often. I think this is going to save you more time than throwing hardware at the problem. Automated builds over night are good if you can arrange for them but development builds to test changes should ideally be restriced to the changed modules which in a good architecture will be only a subset of the system. As a very rough rule of thumb is any of your components are 1-2MB in Release builds ~4MB in Debug builds then they really want subdividing.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Perhaps the architecture isn't the best, but the main problem is a "global" Header file with constants used by more projects that causes a recompile if changed.
So we think about using more powerful machine to make compile times faster.
|
|
|
|
|
MarcoNedwig wrote: the main problem is a "global" Header file
You *do* use "precompiled headers", do you?
And you don't change this constants often and build only to update them?
If you do, you would be better off with reading them from a file at runtime.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
I agree with Mathew,
it should be easier to divide into modules, than change hardware. Other thing is when the final result works slow in the computer, but in development...
On the other hand, it may not be easy to divide the project, good luck.
Greetings.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I agree that breaking up into modules (libraries/DLLs) would be the best thing - but that's not straightforward, you have to be very careful with change management, header inclusion etc.
You still need a full rebuild regulary, so here are som tips. Don'texpect to much, though, shaving off 50% off the compile time is highly unlikely.
In my experience, the VS2005 C++ compiler is mostly CPU limited, so there's not much you can do besides go to a fatter CPU. However, for such a large project, 1G is short. Add more, it will help even if it is just used for disk cache. (check swap file use during build - if it's heavy, you can expect huge gains)
Defrag the VS2005 drive and the drive you build to.
Check if CPU really clogs during build (it might limit at 50%, due to HT). I expect it to do so, but if it doesn't you may be limited by disk speed. (Which is actually be good news, because there's quite some room for improvement. VC6 building to a RAM disk would reduce build times by about 40%. However, comparing a VS2005 build to a good single samsung disk vs. a WD Raptor RAID did not show any difference on my dev system)
Also, IIRC VS2005 uses multiple CPU's only for separat projects that can be built independently - that might be the main reason for splitting up the code base.
In my experience, turning OFF hyperthreading for a single-CPU load is actually faster (less than a percent, though). When building in parallel, you should definitely turn off HT, as you will be trashing cache like mad.
Make sure you build with sensible compiler settings:
if "generating browse files" still works the same way it did, turn it off. Check your precompiled header settings - use a dedicated stdafx.h/stdafx.cpp (do not use automatic) play around with which headers actually included there.
Release builds with optimization turned on can take much longer (and needs much more CPU + probably RAM)
If you want to build a new system: go for raw CPU power and memory throughput, have one disk for the OS, and a secondary for builds. I'm partial to AMD Opteron - though make sure you jump on the new socket.
Always measure, though!
Oh.. and tell me what you tried, and if it helped
Another idea: try turning off "write through" for the disk that receives temporary + output files. The problem is, you definitely don't want that for the drive containing the source code, so you will have to adjust some settings.
|
|
|
|
|
I am a C# developer, recently I got to do with a VC++ 5.0 project, I stuck up with the following situation,
Saving a string(CString) to file which should be saved as UTF-8 encoded.
<br />
void CPrintMakerDlg::SaveHTML(LPCSTR fileName,CString fileContent)<br />
{<br />
ofstream iofile;<br />
try<br />
{<br />
LPCSTR str = fileContent.GetBuffer(fileContent.GetLength());<br />
iofile.open(fileName, ios::in | ios::trunc |ios::binary );<br />
iofile.write(str,fileContent.GetLength()); <br />
}<br />
catch(...)<br />
{<br />
AfxMessageBox("The problem is on saving file");<br />
}<br />
iofile.close(); <br />
}<br />
I heard the CString will be using internally multi-byte character, So I expecting the file format also should be the UTF8 format but its saving as a ASCII.
Thanks,
Vythees
|
|
|
|
|
vytheeswaran wrote: I heard the CString will be using internally multi-byte character, So I expecting the file format also should be the UTF8 format
MBCS and UTF-8 are two different beasts. If your machine is using a loaded code page like Latin-1, I don't believe MBCS will contain any lead bytes that would lead to a double byte sequence anyway. The other western encodings might have them but I've never seen one in action in the US.
vytheeswaran wrote: but its saving as a ASCII
Are you sure it's limiting output to ASCII. It's more likely what some refer to as ANSI. Try outputing a character above index 127. Did the output resemble what MSDN lists for ANSI?
Character sets[^]
Transformation formats[^]
UTF[^]
|
|
|
|
|
Thank you for your links and I open the file in binary mode and append the UTF-8 BOBM EF BB BF in the starting posistion of the file.
solved the problem.
Grazie,
Vythees
|
|
|
|
|
Do you have the file *.rc in its place?
Greetings.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
|
Under the Project->Settings, Resources tab, do you have the correct .res file specified under the 'Resource File name'??
Priya Sundar
|
|
|
|
|
I have used this project in Office Release and Debug Release mode. The project name is mitumori and there is a mitumori.rc too but is doesnot have the mitumori.res. mitumori.res file is present in Office Release folder.
keyto
|
|
|
|
|
Why dont you try importing resources by Insert->Resource, select the type of exact resource you want to get displayed and then import it by selecting the exact file.
Will this help??
Priya Sundar
|
|
|
|
|
This creates certain kind of hex code into the window.
keyto
|
|
|
|
|
Hi,
I have created one IE Toolbar with Tabs each tab having different Toolbars
I was created one invisible window for message relection over the ReBar & over that window i was placed the Tabs & toolbar But my Chevron featue is not working
can anyone help me
please send if anyone know about more it....
Yogesh Amrutkar
|
|
|
|
|
ayogesh_28@yahoo.co.in wrote: But my Chevron featue is not working
Hi,
I am just a learner. I have created and worked with Toolbars.. but what are you reffering to by 'Chevron Feature'. Would like to know.
Thankyou.
Priya Sundar
|
|
|
|
|
Hi
I am creating a Tabs on ReBar over one invisible window & by changing the Tab Selection user can view the different toolbar, Also User can add button on that toolbar at run time if the no of buttons are increase than IE Size then i have to show the Chevron button on clicking on it user can view the other buttons....
I u know any thing then reply me
Yogesh
|
|
|
|
|
I declare a class CChildView2 derived from CView, and change the constructorr's and destructor's attribute from protect to public,
and declare a member variable in CMainFrame as m_wndView2, then replace the original m_wndView with m_wndView2, every thing is well except that when I close the application, there is an exception. What's the problem?
I tracked it, but found nothing.
the problem ocuurs here:
void CView::PostNcDestroy()
{
// default for views is to allocate them on the heap
// the default post-cleanup is to 'delete this'.
// never explicitly call 'delete' on a view
delete this;
}
|
|
|
|
|
CChildWnd is derived from CWnd not CView,
CView will delete itself after the view is destroyed, in PostNcDestroy.
It can't be delete twice.
|
|
|
|
|
Hi,
Currently I am implementing a dll that will be used in the VB application for identifying the multiple mice.
In the C++ dll I have to write the code to receive the RawInputData that will contain the HID, and based on the HDI I can identify the different mouse.
But as I searched in the MSDN I can collect the raw input information HID only inside the WndProc function with the WM_INPUT message.
Please let me know, Is there any way to receive the HID for mouse without WndProc function.
|
|
|
|
|
hello every one,
I am using RegEnumValue function to enumerate the registry values of a open key. I want to know how does it enumerate the values i mean in sorted manner or in different manner. pls help me.
|
|
|
|