|
-
February 25th, 2010, 12:32 PM
#1
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!
-
February 25th, 2010, 12:34 PM
#2
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.
-
February 25th, 2010, 12:50 PM
#3
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.)
-
February 26th, 2010, 03:31 AM
#4
Re: Unresolved external symbol
I already told the linker where to find imaging.lib. Is there anything else I should link?
Thanks!
-
February 26th, 2010, 04:03 AM
#5
Re: Unresolved external symbol
 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
-
February 26th, 2010, 10:33 AM
#6
Re: Unresolved external symbol
-
February 26th, 2010, 10:35 AM
#7
Re: Unresolved external symbol
 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.
-
February 27th, 2010, 02:31 AM
#8
Re: Unresolved external symbol
it would compile..but multiple definitions would get flagged by the linker
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|