Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 888
Juarrow Avatar asked Nov 07 '11 22:11

Juarrow


2 Answers

There is also a .lib file:

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\ windowscodecs.lib

like image 124
caesarvanou Avatar answered Nov 08 '22 08:11

caesarvanou


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
like image 2
parapura rajkumar Avatar answered Nov 08 '22 08:11

parapura rajkumar