[gameprogrammer] LZMA COM question

I'm importing the static lib for LZMA into another project (this is all 
related to compressing resources for a game).

The problem is the author's code uses COM, which I don't know.

This is the error I get when I try to import the code in the static lib:

ymbol _IID_IMatchFinderSetCallback
LZMAWrapperDebug.lib(LZMAEncoder.obj) : error LNK2001: unresolved 
external symbol _IID_ICompressWriteCoderProperties
LZMAWrapperDebug.lib(LZMAEncoder.obj) : error LNK2001: unresolved 
external symbol _IID_ICompressSetCoderProperties
LZMAWrapperDebug.lib(LZMAEncoder.obj) : error LNK2001: unresolved 
external symbol _IID_ICompressSetOutStream

This is the line of code that I added, which is the function that I call 
from the second project:

int Zip(char *inputPath, char *outputPath, int properties)
{
        NCompress::NLZMA::CEncoder *encoderSpec = new 
NCompress::NLZMA::CEncoder;
        CMyComPtr<ICompressCoder> encoder = encoderSpec;

        return 0;
}

This is the place where he defines those functions:
  STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
       const PROPVARIANT *properties, UInt32 numProperties);
etc.

This is the place where he implements those functions:
STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs,
     const PROPVARIANT *properties, UInt32 numProperties)
etc.

This is some kind of GUID thing:
// {23170F69-40C1-278A-0000-000200200000}
DEFINE_GUID(IID_ICompressSetCoderProperties,
0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00);
MIDL_INTERFACE("23170F69-40C1-278A-0000-000200200000")
ICompressSetCoderProperties: public IUnknown
{
   STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
       const PROPVARIANT *properties, UInt32 numProperties) PURE;
};

What do I need to do to get it to link properly?


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: