Static library in Managed C++?

G

Graham

Hi,

I'm trying to create a static library (.lib) with Managed
C++. Is this supposed to be possible?

I have no problems in compiling the .lib, but I encounter
problems when I try to use it. That is, I'm trying to link
it into a Managed C++ DLL, but that's not working (I get
LNK2020 "unresolved external" errors). It's as if the
linker can't see the body of any functions that exist in
..cpp files which are compiled into the .lib.

I'm sure I could just use multiple DLLs, but I sort of
didn't want to, because then my VB.NET project would need
to reference two DLLs rather than one.

Any tips would be appreciated.

-- graham
 
R

Ronald Laeremans [MSFT]

Static libs for managed objects are not supported and do not work. This is
an unfortunate side effect of the way we support IJW references between
managed and unmanaged code.

Ronald Laeremans
Visual C++ team
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top