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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to link against
aygshell.lib. Note that the MSDN page forSHInitExtraControls()says thataygshell.libis 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.libin Visual Studio, go toProject --> Properties --> Linker --> Input --> Additional Dependenciesthen typeaygshell.libin the box.