error LNK2019: unresolved external symbol SHInitExtraControls referenced?

无人久伴 提交于 2020-01-06 06:45:49

问题


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


回答1:


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.

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().

To link against aygshell.lib in Visual Studio, go to Project --> Properties --> Linker --> Input --> Additional Dependencies then type aygshell.lib in the box.



来源:https://stackoverflow.com/questions/3331905/error-lnk2019-unresolved-external-symbol-shinitextracontrols-referenced

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!