[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using c-macro-expand
From: |
Michael Slass |
Subject: |
Re: using c-macro-expand |
Date: |
Fri, 04 Oct 2002 18:01:49 GMT |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
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