MinGW 和 __uuidof
有什么方法可以模拟 MinGW 的 __uuidof 功能吗? AFAIK __uuidof 只是 Visual Studio,但我需要从我的软件中获取一些 GUID,并且它可以在 MinGW 下编译。
谢谢
Is there any way to simulate the __uuidof functionality from MinGW?
AFAIK __uuidof is only Visual Studio, but I need to get some GUIDs from my software and it may compile under MinGW.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不使用带有“#import”指令的 MS VS 来创建 tlh 和 tli?从这些生成的文件中,您可以为 MinGW 创建自己的头文件,并且不再需要 __uuidof 。
Why don't you use MS VS with '#import' directive just to create a tlh and tli? From these generated files you can create your own header file for MinGW and you won't be needing __uuidof any more.
MinGW-w64 提供了一个主要功能的
__uuidof
。我相信GCC 4.7一旦发布将会得到更好的支持。MinGW-w64 provides a mostly-functional
__uuidof
. I believe better support will be in GCC 4.7 once released.