Niroshan
Niroshan

Reputation: 2064

error LNK2020: unresolved token (0A000015) IID_IPropertySetStorage

I am trying to edit 'Summary Information' of a file. I found following code which works fine. But when I try to bring that code to my project, the build fails at Linking stage. http://www.codeproject.com/Articles/16314/Access-the-Summary-Information-Property-Set-of-a-f

The error

1>Linking... 
1>FileSummaryInfo.obj : error LNK2020: unresolved token (0A000015) IID_IPropertySetStorage 
1>FileSummaryInfo.obj : error LNK2001: unresolved external symbol IID_IPropertySetStorage
1>E:\software\TagMyPics\TagMyPics\Debug\TagMyPics.exe : fatal error LNK1120: 2 unresolved externals

The program that I am working on is capable of identifying faces in an image. Once an image file is provided to the program, it detects the face and look up the database to find the name of the person. If name is not in the database it prompts user to enter the name. Then the name is added as a keyword in image file's summary. So when I want to find the images that my friend is in, I can easily search by name. For this I want to edit Keyword property.

Googling suggested that this may be due to the difference between a Win32 Console application (original) and a Win32 Forms application(my version). But I could not find a solution to get this to work. Could you suggest a solution for this or an alternative?

Upvotes: 1

Views: 2862

Answers (2)

Niroshan
Niroshan

Reputation: 2064

I changed 'Project Property Pages' > 'Configuration Properties' > 'C / C++' > 'General' > 'Common Language Runtime Support to /clr. Earlier it was /clr:pure. Now it works

/clr allows having both managed and un-managed functions. For more information read : Common Language Runtime Compilation and Mixed (Native and Managed) Assemblies

Upvotes: 1

Travis G
Travis G

Reputation: 1602

Can you check that the option to not link in the standard library is off (it is by default). Make sure you've included any headers you need, and that you're compiling and linking C++ files in C++ language mode. If all else fails, try starting a new project and re-adding all your source files. Try the steps in this Link

Upvotes: 0

Related Questions