public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to make gcc print messages during compilation.
@ 2000-06-30  8:47 ssathyan
  2000-06-30  9:02 ` Bolan Meek
  2000-06-30 10:24 ` Martin v. Loewis
  0 siblings, 2 replies; 3+ messages in thread
From: ssathyan @ 2000-06-30  8:47 UTC (permalink / raw)
  To: egcs

I am involved in porting applications from Windows NT to Linux.
I have 3 problems
(1) How we can make gcc to print user messages during the compilation
process.
(2) Is there a way I can stop the compilation with error messages Like
#error preprocessor directive in VC++ compilers.
 (3) Is there a good book or web site which gives a good documentation of
how to use gcc. Apart from man and info.

Thank's

Sajan

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

* Re: How to make gcc print messages during compilation.
  2000-06-30  8:47 How to make gcc print messages during compilation ssathyan
@ 2000-06-30  9:02 ` Bolan Meek
  2000-06-30 10:24 ` Martin v. Loewis
  1 sibling, 0 replies; 3+ messages in thread
From: Bolan Meek @ 2000-06-30  9:02 UTC (permalink / raw)
  To: ssathyan; +Cc: egcs

ssathyan@india.smartstorage.com wrote:
> 
> I am involved in porting applications from Windows NT to Linux.
> I have 3 problems
> (1) How we can make gcc to print user messages during the compilation
> process.

Large projects, and even some small ones, are generally
compiled using make.  Makefiles can execute _whatever_ is desired
for user messages, even X clients.

> (2) Is there a way I can stop the compilation with error messages Like
> #error preprocessor directive in VC++ compilers.

AFAIK, make generally aborts processing unless told, with an
option switch, to do otherwise.  To force a bail-out from
compiling or pre-processing, one _could_ intentionally
introduce errors.

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

* Re: How to make gcc print messages during compilation.
  2000-06-30  8:47 How to make gcc print messages during compilation ssathyan
  2000-06-30  9:02 ` Bolan Meek
@ 2000-06-30 10:24 ` Martin v. Loewis
  1 sibling, 0 replies; 3+ messages in thread
From: Martin v. Loewis @ 2000-06-30 10:24 UTC (permalink / raw)
  To: ssathyan; +Cc: egcs

> (1) How we can make gcc to print user messages during the compilation
> process.

With the #error directive, or with the #warning directive.

> (2) Is there a way I can stop the compilation with error messages Like
> #error preprocessor directive in VC++ compilers.

Yes, the #error directive. That's not a MSVC invention - it is part of
the international standard.

>  (3) Is there a good book or web site which gives a good documentation of
> how to use gcc. Apart from man and info.

There is a gcc manual available, which you can order from the
FSF. However, it is the same material as the texinfo documentation.

Please note that gcc, in general, aims at implementing the relevant
standards for the languages it supports. So any good book on the
language is also a good book for GCC usage. In this particular case, a
good book on C or C++ would have told you that you can rely on #error
being there in every self-respecting compiler.

Regards,
Martin

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

end of thread, other threads:[~2000-06-30 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-30  8:47 How to make gcc print messages during compilation ssathyan
2000-06-30  9:02 ` Bolan Meek
2000-06-30 10:24 ` Martin v. Loewis

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).