[cfe-dev] [Windows] __uuidof support?

Reid Kleckner rnk at google.com
Wed Dec 4 09:36:12 PST 2013

What C/C++ runtime are you trying to use, a mingw variant or one of

We support __uuidof in the Microsoft C++ ABI, but not the Itanium C++ ABI.
 The easiest way to use the Microsoft C++ ABI support is with the clang-cl

However, the Microsoft C++ ABI support is still really immature, so you
might want to stick with mingw.  In the Microsoft C++ ABI, Clang lacks
support for:
- pass by value of certain kinds of objects
- exceptions
- debug info
- member pointer support is a bit weak

On Wed, Dec 4, 2013 at 5:14 AM, Fredrik Orderud <forderud at gmail.com> wrote:

> It seems like there is no support for the "__uuidof" operator in clang.
> This operator is heavily used in conjunction to COM on Windows.
> Attempting to build a small Direct3D example code (attached) with "clang
> -v test.cpp -o test.exe" yields the following error:
> ---
> test.cpp:8:37: error: cannot yet mangle expression type CXXUuidofExpr
> _COM_SMARTPTR_TYPEDEF(ID3D10Device, __uuidof(ID3D10Device));
>                                     ^~~~~~~~~~~~~~~~~~~~~~
> c:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\INCLUDE\comdef.h:296:60:
> note:
>       expanded from macro '_COM_SMARTPTR_TYPEDEF'
>     typedef _COM_SMARTPTR<_COM_SMARTPTR_LEVEL2<Interface, &IID> > \
>                                                            ^
> ---
> Clang was built from trunk yesterday.
> Can anyone tell me if there are any plans to implement "__uuidof" support
> in the near future? If not, should I register an Bugzilla issue on the
> problem?
> Thanks in advance,
> Fredrik Orderud
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131204/02709bf1/attachment.html>

More information about the cfe-dev mailing list