Oh, I didn't see that last option from the help message.  That's it.  Thanks.<br><br>
<div class="gmail_quote">On Fri, Nov 20, 2009 at 11:39 AM, Jean-Daniel Dupas <span dir="ltr"><<a href="mailto:devlists@shadowlab.org">devlists@shadowlab.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>Le 20 nov. 2009 à 20:18, John Thompson a écrit :<br>
<div>
<div></div>
<div class="h5"><br>> How to force clang to compile a file as C++?<br>><br>> I tried:<br>><br>> clang -Xclang "-x=c++" -fsyntax-only file.c<br>> but I get the error:<br>><br>> clang-cc.exe: for the -x option: may only occur zero or one times!<br>
><br>> Is this a general problem with the driver in that options passed with -x don't supercede those provided by the driver?<br>><br>> I tried:<br>><br>> clang -Xclang="-x=c++" -fsyntax-only file.c<br>
> but it apparently ignored the argument.<br>><br>> I tried:<br>><br>> clang -ccc-cxx -fsyntax-only file.c<br>><br>> but it still compiles it as C.<br><br></div></div>What about<br><br>clang -x c++ main.c<br>
<font color="#888888"><br>-- Jean-Daniel<br><br><br><br><br></font></blockquote></div><br><br clear="all"><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br>
<br>