错误LNK2019:引用了无法解析的外部符号SHInitExtraControls? [英] error LNK2019: unresolved external symbol SHInitExtraControls referenced?
问题描述
我该如何解决此错误:
错误1错误LNK2019:函数"public:virtual int __cdecl CTestApp :: InitInstance(void)"(?InitInstance @ CTestApp @@ UAAHXZ)Test.obj中引用的未解析的外部符号SHInitExtraControls
Error 1 error LNK2019: unresolved external symbol SHInitExtraControls referenced in function "public: virtual int __cdecl CTestApp::InitInstance(void)" (?InitInstance@CTestApp@@UAAHXZ) Test.obj
谢谢
推荐答案
您需要链接到 aygshell.lib
.请注意, SHInitExtraControls()
MSDN页面a>表示 aygshell.lib
是使用它的必需库.
You need to link against aygshell.lib
. Note that the MSDN page for SHInitExtraControls()
says that aygshell.lib
is the required library to use it.
LNK2019 通常意味着您忘记提供某些东西的定义.在这种情况下, SHInitExtraControls()
的定义位于 aygshell.lib
中.如果没有它,当您尝试使用 SHInitExtraControls()
时,链接器将会抱怨.
A LNK2019 usually means that you forgot to provide a definition of something. In this case, the definition of SHInitExtraControls()
is located in aygshell.lib
. Without it, the linker will complain when you attempt to use SHInitExtraControls()
.
要在Visual Studio中链接到 aygshell.lib
,请转到 Project->属性->连结器->输入->其他依赖项
,然后在框中输入 aygshell.lib
.
To link against aygshell.lib
in Visual Studio, go to Project --> Properties --> Linker --> Input --> Additional Dependencies
then type aygshell.lib
in the box.
这篇关于错误LNK2019:引用了无法解析的外部符号SHInitExtraControls?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!