How to solve Link Error on call to ::UuidToString(

2020-04-11 05:15发布

I have included file "rpcdce.h" for ::UuidToString() function.

Still i am getting link error . Can anyone help me ?

2条回答
我欲成王,谁敢阻挡
2楼-- · 2020-04-11 05:40

See http://msdn.microsoft.com/en-us/library/aa379352%28VS.85%29.aspx - this seems to indicate that you need to link with Rpcrt4.lib.

查看更多
爷的心禁止访问
3楼-- · 2020-04-11 05:48

Header files don't solve linker errors, they create them. You'll have to add rpcrt4.lib to the linker's Input + Additional Dependencies setting. Or paste this in your source code file:

#pragma comment(lib, "rpcrt4.lib")
查看更多
登录 后发表回答