<div dir="ltr">This is a horrible hack, but try adding:<div>-Xclang -x -Xclang objc++</div><div><br></div><div>If your files end in .mm, we will assume they are Obj-C++ by default.</div><div><br></div><div>Basically the clang-cl driver does not accept the same set of command line flags that the gcc-style driver accepts because there are conflicts around some commonly used options (-MD, for example). We make gcc-style flags available in clang-cl on an as-needed basis assuming there are no conflicts. Understandably, it is really confusing to users to have to understand two sets of flags and it might be worth revisiting that decision.</div><div><br></div><div>The -Xclang flag is a workaround that bypasses both the gcc-style and cl-style flags processing and directly accesses the clang -cc1 command line flag set, which is yet again different from either of the first two.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 1, 2014 at 12:09 PM, Eric Mader <span dir="ltr"><<a href="mailto:emader@gmx.us" target="_blank">emader@gmx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have some C++ source files that mix in small bits of Obj-C. On the Mac, these files are marked to be compiled as Obj-C++. Looking at the clang help, it seems that the option for that is "-ObjC++". However, when I add that in Additional Options I get an error message:<br>
<br>
CL> : error : invalid integral value 'bjC++' in '-ObjC++'<br>
<br>
I see this same message if I put "-Xclang" in front of "-ObjC++".<br>
<br>
Is there a way to get the code to compile as Obj-C++ on Windows?<br>
<br>
Regards,<br>
Eric Mader<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>