2009年10月28日 星期三

Link error - using IImage

MultiLaunchIIDlg.obj : error LNK2019: unresolved external symbol CLSID_ImagingFactory referenced in function "public: struct HBITMAP__ * __cdecl CMultiLaunchIIDlg::LoadImageWithImagingApi(unsigned short const *)" (?LoadImageWithImagingApi@CMultiLaun
chIIDlg@@QAAPAUHBITMAP__@@PBG@Z)
MultiLaunchIIDlg.obj : error LNK2019: unresolved external symbol IID_IImagingFactory referenced in function "public: struct HBITMAP__ * __cdecl CMultiLaunchIIDlg::LoadImageWithImagingApi(unsigned short const *)" (?LoadImageWithImagingApi@CMultiLaunc
hIIDlg@@QAAPAUHBITMAP__@@PBG@Z)
ARMV4IRel/MultiLaunchII.exe : fatal error LNK1120: 2 unresolved externals

Solution
關鍵在於要include一個file
#include "initguid.h"
並且要加在Imaging.h之前
#include "Imaging.h"

Reference:
http://blog.csdn.net/norains/archive/2007/08/14/1743386.aspx

透過Facebook分享

沒有留言: