unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* using c-macro-expand
@ 2002-10-04 16:46 Kevin Dziulko
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Dziulko @ 2002-10-04 16:46 UTC (permalink / raw)


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

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

* Re: using c-macro-expand
       [not found] <mailman.1033750036.1210.help-gnu-emacs@gnu.org>
@ 2002-10-04 18:01 ` Michael Slass
  2002-10-04 18:29   ` Kevin Dziulko
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Slass @ 2002-10-04 18:01 UTC (permalink / raw)


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

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

* Re: using c-macro-expand
  2002-10-04 18:01 ` using c-macro-expand Michael Slass
@ 2002-10-04 18:29   ` Kevin Dziulko
  2002-10-04 19:10     ` Michael Slass
       [not found]     ` <mailman.1033758554.2997.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Dziulko @ 2002-10-04 18:29 UTC (permalink / raw)
  Cc: help-gnu-emacs

On Fri, 4 Oct 2002, Michael Slass wrote:

> 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"
>
>
>

I added to .emacs:
(setq c-macro-preprocessor "/usr/ucb/cc -C -E")

cc is the c compiler, -C for preprocessor to leave in comments, and -E to
preprocess only.  Now when I run c-macro-expand, I get error message:

Search failed: "^J??? !!! ??? start of c-macro expansion ??? !!! ???"

any ideas?

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

* Re: using c-macro-expand
  2002-10-04 18:29   ` Kevin Dziulko
@ 2002-10-04 19:10     ` Michael Slass
       [not found]     ` <mailman.1033758554.2997.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Slass @ 2002-10-04 19:10 UTC (permalink / raw)
  Cc: Michael Slass, help-gnu-emacs

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

>
>I added to .emacs:
>(setq c-macro-preprocessor "/usr/ucb/cc -C -E")
>
>cc is the c compiler, -C for preprocessor to leave in comments, and -E to
>preprocess only.  Now when I run c-macro-expand, I get error message:
>
>Search failed: "^J??? !!! ??? start of c-macro expansion ??? !!! ???"
>
>any ideas?
>
>

Please post your question back to the original newsgroup:

1) because a wider audience will more likely be able to help you
2) it is poor etiquette to take my posting an answer to your newsgroup
   question as an invitation to send me unsolicited questions.

-- 
Mike Slass

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

* Re: using c-macro-expand
       [not found]     ` <mailman.1033758554.2997.help-gnu-emacs@gnu.org>
@ 2002-10-04 19:14       ` Michael Slass
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Slass @ 2002-10-04 19:14 UTC (permalink / raw)


Michael Slass <miknrene@drizzle.com> writes:

>Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:
>
>>
>>I added to .emacs:
>>(setq c-macro-preprocessor "/usr/ucb/cc -C -E")
>>
>>cc is the c compiler, -C for preprocessor to leave in comments, and -E to
>>preprocess only.  Now when I run c-macro-expand, I get error message:
>>
>>Search failed: "^J??? !!! ??? start of c-macro expansion ??? !!! ???"
>>
>>any ideas?
>>
>>
>
>Please post your question back to the original newsgroup:
>
>1) because a wider audience will more likely be able to help you
>2) it is poor etiquette to take my posting an answer to your newsgroup
>   question as an invitation to send me unsolicited questions.
>
>-- 
>Mike Slass
>
>
>

I see that you did post to the group, but cc'ed me as part of a
reply-all or some such.  Sorry for being touchy.


-- 
Mike Slass

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

end of thread, other threads:[~2002-10-04 19:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1033750036.1210.help-gnu-emacs@gnu.org>
2002-10-04 18:01 ` using c-macro-expand Michael Slass
2002-10-04 18:29   ` 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

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