Question about how to use pre-compile in VS2003 Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
bloodlee
Experienced Solver
Experienced Solver
Posts: 77
Joined: Thu Nov 30, 2006 10:49 am
Location: Shenzhen, CHN

Question about how to use pre-compile in VS2003

Post by bloodlee »

Dear all.

As my project is getting bigger and bigger, I am trying to use pre-compile to accelerate build speed. I wrote header/src files like below.

stdwx.h

Code: Select all

#ifndef __STDWX_H__
#define __STDWX_H__

#include "wx/wxprec.h"
#include "wx/grid.h"
#include "wx/xrc/xmlres.h"

#ifdef __BORLANDC__
	#pragma hdrstop
#endif

#ifndef WX_PRECOMP
	#include "wx/wx.h"
	#include "wx/grid.h"
#endif

#endif // __STDWX_H__ // 
stdwx.cpp

Code: Select all

#include "stdwx.h"
I changed my project's configuration and included this header file in several(about 15/700) source files of my project. But I can not feel the change of build speed. Also, I checked the .pch file, it's just 256k.

I am not sure my way is correct. Or, pre-compiling can not improve the build effciency greatly.

Any idea about it? Or any suggestion about accelerate build speed without change structure of legacy code?

Thanks so much. :)

PS: I am using VS.Net 2003 as my developing tool.
rodrigod
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Thu Jun 26, 2008 8:50 pm

Post by rodrigod »

Are you using "Automatic use of precompiled Header" or are you using and creating it manually?

Sometimes automatic use doesnt work, always set it manually

see ya
bloodlee
Experienced Solver
Experienced Solver
Posts: 77
Joined: Thu Nov 30, 2006 10:49 am
Location: Shenzhen, CHN

Post by bloodlee »

Yes, rodrigod!
It works!

Thanks.
Post Reply