"Achim Domma" <domma@procoders.netwrote in message
news:4503ee10$0$18488$9b4e6d93@newsspool3.arcor-online.net...
Quote:
Bruno van Dooren [MVP VC++] wrote:
>
Quote:
Quote:
>>error LNK2001: unresolved external symbol IID_IGraphBuilder
>>
>Did you perhaps accidentally forget to include the appropriate header
>that defines that IID?
>Another likely cause of that problem is explained here:
>
http://vcfaq.mvps.org/com/13.htm >
I solved the problem: The library is per default compiled with /clr:pure
and the default for the executable ist /clr. If I compile the library with
/clr too, it work's fine so far.
>
Could somebody explain this behavior?
I suppose you are also using this interface directly from your executable.
When a native type is compiled in managed code, the assembly name becomes
part of the type's identity, so IID_IGraphBuilder in the assembly is
incompatible and can't satisfy a reference for IID_IGraphBuilder in the main
exe. When you compile in mixed mode, UUID becomes a native type, the normal
C++ rules apply.