views:

44

answers:

1

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

A: 

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.

In silico
no i didnt, should i? how to do do that(I am newbie)?
user1111111
Yes, you must link against `aygshell.lib` to use the `SHInitExtraControls()` function.
In silico