错误 LNK2019:引用了无法解析的外部符号 SHinitExtraControls?
我该如何解决此错误:
错误1错误LNK2019:函数“public:virtual int __cdecl CTestApp :: InitInstance(void)”(?InitInstance@CTestApp@@UAAHXZ)Test.obj中引用了无法解析的外部符号
SHInitExtraControls
How can i resolve this error:
Error 1 error LNK2019: unresolved external symbol SHInitExtraControls referenced in function "public: virtual int __cdecl CTestApp::InitInstance(void)" (?InitInstance@CTestApp@@UAAHXZ) Test.obj
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要链接到
aygshell.lib
。请注意,MSDN 页面的SHInitExtraControls()
表示aygshell.lib
是使用它所需的库。LNK2019 通常意味着您忘记提供某事物的定义。在本例中,
SHInitExtraControls()
的定义位于aygshell.lib
中。如果没有它,当您尝试使用SHInitExtraControls()
时,链接器将会抱怨。要在 Visual Studio 中链接到
aygshell.lib
,请转到Project -->属性-->链接器 -->输入-->其他依赖项
,然后在框中输入aygshell.lib
。You need to link against
aygshell.lib
. Note that the MSDN page forSHInitExtraControls()
says thataygshell.lib
is the required library to use it.A LNK2019 usually means that you forgot to provide a definition of something. In this case, the definition of
SHInitExtraControls()
is located inaygshell.lib
. Without it, the linker will complain when you attempt to useSHInitExtraControls()
.To link against
aygshell.lib
in Visual Studio, go toProject --> Properties --> Linker --> Input --> Additional Dependencies
then typeaygshell.lib
in the box.