Search code examples
c++visual-studiovisual-studio-2010mfcunresolved-external

visual studio building error: unresolved external symbol _IID_IWICImagingFactory (MFC static lib)


I wrote a porgram with a few standard dialogs in an SDI (Doc/View enabled) project.

Now that I want to send it to some friends i did set the Use of MFC Use MFC in a static library.

But when i try to build the solution i get the following error:

error LNK2001: unresolved external symbol _IID_IWICImagingFactory

My problem is, that i don´t know what exactly this interface id is, because i did not write any code for COM manually or using any image factory things or equal...

Im a bit lost atm...

May anyone tell me how to solve this and make it work with the static MFC usage?

Thanks in advance!


Solution

  • IWICImagingFactory is defined in wincodec.idl

    • Locate and add wincodec.idl to your MFC project
    • Rebuild and MIDL compiler will generate wincodec_i.c and wincodec_i.h
    • wincodec_i.* files contain the declaration and definition of _IID_IWICImagingFactory