public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Headers not precompiling
@ 2006-07-12 19:55 Mark Wagner
  2006-07-12 21:48 ` Brian Dessent
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wagner @ 2006-07-12 19:55 UTC (permalink / raw)
  To: gcc-help

According to the documentation
(http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html), creating
a precompiled header is done by invoking GCC on the header the same
way you'd compile a file.  So, the command line

/opt/mingw/i386-mingw32msvc/bin/gcc -fshort-wchar -xc++
-D_MSC_VER=0x0500 -I../../PUBINC -I../NEO/NeoIncludes
-I../NEO/NeoIncludes/ibmpc -I../NEO/NeoIncludes/ibmpc/Alone
-I../NEO/NeoExtras TGEQWin32.h

should produce a a precompiled header called "TGEQWin32.h.gch".  It
doesn't.  Instead, GCC tries to link the header file with the standard
libraries to produce an executable.  Am I doing something stupid here,
or is this a bug?  I'm using GCC 3.4.2 configured as a cross-compiler
to create Windows executables on a Mac computer.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Headers not precompiling
  2006-07-12 19:55 Headers not precompiling Mark Wagner
@ 2006-07-12 21:48 ` Brian Dessent
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Dessent @ 2006-07-12 21:48 UTC (permalink / raw)
  To: gcc-help

Mark Wagner wrote:

> According to the documentation
> (http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html), creating
> a precompiled header is done by invoking GCC on the header the same
> way you'd compile a file.  So, the command line
> 
> /opt/mingw/i386-mingw32msvc/bin/gcc -fshort-wchar -xc++
> -D_MSC_VER=0x0500 -I../../PUBINC -I../NEO/NeoIncludes
> -I../NEO/NeoIncludes/ibmpc -I../NEO/NeoIncludes/ibmpc/Alone
> -I../NEO/NeoExtras TGEQWin32.h

I think you want -xc++-header, not -xc++.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-12 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12 19:55 Headers not precompiling Mark Wagner
2006-07-12 21:48 ` Brian Dessent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).