Hi 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
Hi 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
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.