Hi,
I don't follow the recommended C++ practice that consists to separate header files and implementation files.
Most of my classes are fully defined in their header files.
The well-known drawback is that it makes compilation slow.
By now I feel the need to really reduce compilation times, I found two simple ways :
- use precompiled headers.
- keep implementation of the classes in cpp files instead in headers.
I tried to use precompiled headers but compilation speed is the same. I have only tried the automatic mode(i.e. /YX). I'm not very seduced by the manual mode because I don't want to pollute my work with the horrible "#pragma hdrstop", and don't feel sure where to put it.
Does anyone know how to use correctly the automatic mode?
I can't find more help from MSDN (to be short it just tells "use /YX").
The other solution is easy, but painful if non automated. I can't find tools that generates implementation files from header files. Actually from one of my header file I need to create two files:
- A header file, which is the prototype of the class(no implementation)
- An implemenation file
Does anyone know such tools?
Thanks to all.
--
Globos
I don't follow the recommended C++ practice that consists to separate header files and implementation files.
Most of my classes are fully defined in their header files.
The well-known drawback is that it makes compilation slow.
By now I feel the need to really reduce compilation times, I found two simple ways :
- use precompiled headers.
- keep implementation of the classes in cpp files instead in headers.
I tried to use precompiled headers but compilation speed is the same. I have only tried the automatic mode(i.e. /YX). I'm not very seduced by the manual mode because I don't want to pollute my work with the horrible "#pragma hdrstop", and don't feel sure where to put it.
Does anyone know how to use correctly the automatic mode?
I can't find more help from MSDN (to be short it just tells "use /YX").
The other solution is easy, but painful if non automated. I can't find tools that generates implementation files from header files. Actually from one of my header file I need to create two files:
- A header file, which is the prototype of the class(no implementation)
- An implemenation file
Does anyone know such tools?
Thanks to all.
--
Globos