unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: using c-macro-expand
Date: Fri, 04 Oct 2002 18:01:49 GMT	[thread overview]
Message-ID: <m3wuoy13px.fsf@localhost.localdomain> (raw)
In-Reply-To: mailman.1033750036.1210.help-gnu-emacs@gnu.org

Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:

>When I run to c-macro-expand command, I get the following:
>
>----------------------------------------
>/* Preprocessor terminated with status 1
>
>   Messages from `/lib/cpp -C ':
>
>/lib/cpp: Command not found
>
>
>*/
>
>Preprocessor produced no output
>----------------------------------------
>
>I'm running GNU Emacs 20.2.3 (sparc-sun-solaris2.6, X toolkit).
>I don't know what cpp -C is. Do I need to set a path to my
>c compiler (/usr/ucb/cc) or something?
>
>Thanks!
>Kevin
>
>
>

I think you need to customize the variable c-macro-preprocessor

From the file cmacexp.el:

,----
| ;; If you use a preprocessor other than /lib/cpp (be careful to set a
| ;; -C option or equivalent in order to make the preprocessor not to
| ;; strip the comments):
| ;;(setq c-macro-preprocessor "gpp -C")
| ;;
| ;; If you often use a particular set of flags:
| ;;(setq c-macro-cppflags "-I /usr/include/local -DDEBUG"
| ;;
| ;; If you want the "Preprocessor arguments: " prompt:
| ;;(setq c-macro-prompt-flag t)
`----

,----[ C-h v c-macro-preprocessor RET ]
| c-macro-preprocessor's value is "/lib/cpp -C"
| 
| Documentation:
| The preprocessor used by the cmacexp package.
| 
| If you change this, be sure to preserve the `-C' (don't strip comments)
| option, or to set an equivalent one.
| 
| You can customize this variable.
| 
| Defined in `/usr/share/emacs/21.2/lisp/progmodes/cmacexp.el'.
`----

So you do need to set it to the path to your c compiler, and include
whatever switch is uses to indicate "preprocessor only"


-- 
Mike Slass

       reply	other threads:[~2002-10-04 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1033750036.1210.help-gnu-emacs@gnu.org>
2002-10-04 18:01 ` Michael Slass [this message]
2002-10-04 18:29   ` using c-macro-expand Kevin Dziulko
2002-10-04 19:10     ` Michael Slass
     [not found]     ` <mailman.1033758554.2997.help-gnu-emacs@gnu.org>
2002-10-04 19:14       ` Michael Slass
2002-10-04 16:46 Kevin Dziulko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3wuoy13px.fsf@localhost.localdomain \
    --to=miknrene@drizzle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).