<div>How to force clang to compile a file as C++?</div>
<div> </div>
<div>I tried:</div>
<div> </div>
<div>clang -Xclang "-x=c++" -fsyntax-only file.c<br clear="all"></div>
<div>but I get the error:</div>
<div> </div>
<div>clang-cc.exe: for the -x option: may only occur zero or one times!</div>
<div> </div>
<div>Is this a general problem with the driver in that options passed with -x don't supercede those provided by the driver?</div>
<div> </div>
<div>I tried:</div>
<div> </div>
<div>clang -Xclang="-x=c++" -fsyntax-only file.c<br clear="all"></div>
<div>but it apparently ignored the argument.</div>
<div> </div>
<div>I tried:</div>
<div> </div>
<div>clang -ccc-cxx -fsyntax-only file.c</div>
<div> </div>
<div>but it still compiles it as C.</div>
<div> </div>
<div>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br></div>