Unresolved external symbol
Hi! I'm trying to use the imaging library APIs but, when I try to create:
::CoCreateInstance(CLSID_ImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IImagingFactory, (void **)&pFactory);
I get:
Error 2 error LNK2019: unresolved external symbol IID_IImagingFactory referenced in function "public: virtual void __cdecl ImageLoader::run(void)" (?run@ImageLoader@@UAAXXZ) imageloader.obj SCD
I tried to include as well:
#include <initguid.h>
#include <imgguids.h>
but I got a multiple definition. Is there any other way of defining those symbols?
Thanks!
Re: Unresolved external symbol
Goto your project properties goto c++ then code generation change the runtime library to multi threaded MT.
See if that helps.
Re: Unresolved external symbol
Make sure you're linking the actual library. (#includes are only useful to the compiler; the linker doesn't care about them.)
Re: Unresolved external symbol
I already told the linker where to find imaging.lib. Is there anything else I should link?
Thanks!
Re: Unresolved external symbol
Quote:
Originally Posted by
Luc484
Hi! I'm trying to use the imaging library APIs but, when I try to create:
::CoCreateInstance(CLSID_ImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_IImagingFactory, (void **)&pFactory);
I get:
Error 2 error LNK2019: unresolved external symbol IID_IImagingFactory referenced in function "public: virtual void __cdecl ImageLoader::run(void)" (?run@ImageLoader@@UAAXXZ) imageloader.obj SCD
I tried to include as well:
#include <initguid.h>
#include <imgguids.h>
but I got a multiple definition. Is there any other way of defining those symbols?
Thanks!
Did you do the includes in a .h of .cpp file..Try putting the includes in a .cpp file
Re: Unresolved external symbol
Re: Unresolved external symbol
Quote:
Originally Posted by
sunil_cguru
Did you do the includes in a .h of .cpp file..Try putting the includes in a .cpp file
If it was an includes problem if wouldn't have compiled.
Re: Unresolved external symbol
it would compile..but multiple definitions would get flagged by the linker