www.digitalmars.com         C & C++   DMDScript  

c++ - Precompiled header files: What flags when?

reply Scott Michel <scottm aero.org> writes:
I have no problems generating a precompiled header and the resulting 
.sym and .obj files. The question I have is which "-H" flag to use in 
order to get DMC to read the precompiled header:

	-Hbuild\somefile.sym		(doesn't seem right)
	-H				(compiler groans)
	-HDbuild -Hsomefile.sym		(dunno if this is right)
	-HIsomefile.sym			(compiler groans)

In most of my experimentation, "-HD" is totally broken, e.g.

	-HDbuild -HFsomefile.sym

places somefile.sym and somefile.obj in the current directory.

Any clues?
Oct 06 2004
parent reply Arjan Knepper <arjan ask.me> writes:
Scott Michel wrote:
 I have no problems generating a precompiled header and the resulting 
 .sym and .obj files. The question I have is which "-H" flag to use in 
 order to get DMC to read the precompiled header:
 
     -Hbuild\somefile.sym        (doesn't seem right)
     -H                (compiler groans)
     -HDbuild -Hsomefile.sym        (dunno if this is right)
     -HIsomefile.sym            (compiler groans)
 
 In most of my experimentation, "-HD" is totally broken, e.g.
 
     -HDbuild -HFsomefile.sym
 
 places somefile.sym and somefile.obj in the current directory.
 
 Any clues?
Here is a sample of what I useally do: ('stdhac.h' is the headerfile to precompile) creating: -HF.\RELEASE\stdhac.SYM -o.\RELEASE\stdhac.PCO ..\stdhac.h using it: -H -HD.\RELEASE -HO- to use -HI you probably need to do :-H -HI.\<PATH>\PRECHFILE.PCO Hope this helps, Arjan
Oct 07 2004
parent Scott Michel <scottm aero.org> writes:
Arjan Knepper wrote:
 creating: -HF.\RELEASE\stdhac.SYM -o.\RELEASE\stdhac.PCO ..\stdhac.h
 using it: -H -HD.\RELEASE -HO-
 
 to use -HI you probably need to do :-H -HI.\<PATH>\PRECHFILE.PCO
Tried this out and just got a "Internal error: cgobj 3101". I'll have to go and reduce the code down to something reproducable... :-( -scooter
Oct 07 2004