From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: using c-macro-expand Date: Fri, 04 Oct 2002 18:01:49 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034029881 28723 127.0.0.1 (7 Oct 2002 22:31:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2002 22:31:21 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17xWtP-0007Fy-00 for ; Fri, 04 Oct 2002 20:09:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xWpz-0007g1-00; Fri, 04 Oct 2002 14:06:07 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!wn11feed!wn6feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 12.228.27.239 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: rwcrnsc52.ops.asp.att.net 1033754509 12.228.27.239 (Fri, 04 Oct 2002 18:01:49 GMT) Original-NNTP-Posting-Date: Fri, 04 Oct 2002 18:01:49 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:105721 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2347 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2347 Kevin Dziulko 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