<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.1">
</HEAD>
<BODY>
You could always just call cpp(1) directly.<BR>
<BR>
I do this with various excessively for awk.<BR>
<BR>
On Wed, 2008-03-12 at 09:14 -0700, Gregor Richards wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Alexander Panek wrote:</FONT>
<FONT COLOR="#000000">> Derek Parnell wrote:</FONT>
<FONT COLOR="#000000">>> On Wed, 12 Mar 2008 17:56:49 +0900, Bill Baxter wrote:</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>>> I just resorted to this in something I was doing the other day:</FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>>> > gcc -C -E -xc file_in.d | sed -e "s/^#/#line/" > file.d</FONT>
<FONT COLOR="#000000">>>> > dmd file.d</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> I have no idea what that means.</FONT>
<FONT COLOR="#000000">>> I don't use gcc and I run D in a Windows environment. I use Linux </FONT>
<FONT COLOR="#000000">>> daily at</FONT>
<FONT COLOR="#000000">>> the office because that's I develop software for (but not in C/C++) so I</FONT>
<FONT COLOR="#000000">>> understand the 'sed' part is, but what's gcc doing?</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Preprocessing, probably?</FONT>
<FONT COLOR="#000000">Yeah, this is the "simple" way of using the C preprocessor with any </FONT>
<FONT COLOR="#000000">language.</FONT>
<FONT COLOR="#000000"> - Gregor Richards</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>