[cfe-dev] Microsoft Specified LangOpts - don't appear to be working?

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 4 09:31:22 PDT 2015


MSCompatibilityVersion should probably be set this way:
        lo.MSCompatibilityVersion = clang::LangOptions::MSVC2013
* 10000000U;
MSCompatibiltiyVersion is the value you want for the _MSC_FULL_VER macro.

On Fri, Sep 4, 2015 at 9:16 AM, Joshua Gerrard via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hello,
>
> I'm using clang as a library, and am trying to compile a program that uses
> Windows.h. I've gone and set the following LangOptions:
>
>         lo.MSVCCompat = true;
>
>         lo.MSCompatibilityVersion = clang::LangOptions::MSVC2013;
>
>         lo.MicrosoftExt = true;
>
>         lo.AsmBlocks = true;
>
>         lo.DelayedTemplateParsing = true;
>
> This fixed some issues with AsmBlocks and the IUnknown issue (hence the
> delayed template parsing), but Windows.h still doesn't compile.
>
> So, I tried setting __STDC__ after reading some things online (Microsoft
> made a member of a type called bool ... yeah,
> http://lists.llvm.org/pipermail/cfe-dev/2010-August/010174.html), however
> this results in yet more issues and it's not clear if my setting __STDC__
> caused this.
>
> My question is, am I missing some key step in enabling VC++ compatibility?
>
> Thank you in advance,
>
> Joshua
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150904/48f14d2d/attachment.html>


More information about the cfe-dev mailing list