#include cause errors

前端 未结 3 1849
礼貌的吻别
礼貌的吻别 2021-02-04 00:08

VS 2010 C++ CLR Library project, errors on adding comutil.h library

> Error 20  error LNK2001: unresolved
> external symbol \"extern \"C\" long
> __stdc         


        
相关标签:
3条回答
  • 2021-02-04 00:55

    According to MSDN, _bstr_t requires comsuppw.lib. Add this library to the linker dependencies list.

    0 讨论(0)
  • 2021-02-04 00:57

    Add the requisite import library as per the documentation, likely Oleaut32.lib

    http://msdn.microsoft.com/en-us/library/ms221236.aspx

    edit: I'm assuming the Compiler COM Support library subsumes this and Alex's answer would be the preferred library.

    0 讨论(0)
  • 2021-02-04 01:09

    try to include comdef.h, don't include comutil.h

    0 讨论(0)
提交回复
热议问题