D
David Kantowitz
I am trying to wrap a native-C++ DLL in managed C++, to
use in a .NET project.
The native code is compiled into a DLL, and I have created
a .def file that exports the mangled names of the symbols
I am going to use from the wrapper library.
The wrapper library has the code written that uses the
native classes, and wraps them to present an equivalent of
their interface for .NET.
When I compile the managed-C++ wrapper library, everything
compiles fine, but upon linking I get a series of LNK2020
errors about unresolved tokens.
The help for this error suggests it is unable to resolve a
reference to the function that is in the metadata.
My wrapper project is set up to link against the import
library for the native DLL. When I do not link against
this library, I get the usual LNK2001 unresolved external
symbol. When I link against the import library, these go
away, but the LNK2020 appears.
Is it looking for metadata information in my native DLL,
or does it just mean that there is a reference in the
managed library's metadata that couldn't be resolved? In
either case, how do I go about resolving this?
Thanks in advance.
Regards,
David.
use in a .NET project.
The native code is compiled into a DLL, and I have created
a .def file that exports the mangled names of the symbols
I am going to use from the wrapper library.
The wrapper library has the code written that uses the
native classes, and wraps them to present an equivalent of
their interface for .NET.
When I compile the managed-C++ wrapper library, everything
compiles fine, but upon linking I get a series of LNK2020
errors about unresolved tokens.
The help for this error suggests it is unable to resolve a
reference to the function that is in the metadata.
My wrapper project is set up to link against the import
library for the native DLL. When I do not link against
this library, I get the usual LNK2001 unresolved external
symbol. When I link against the import library, these go
away, but the LNK2020 appears.
Is it looking for metadata information in my native DLL,
or does it just mean that there is a reference in the
managed library's metadata that couldn't be resolved? In
either case, how do I go about resolving this?
Thanks in advance.
Regards,
David.