Static library in Managed C++?

  • Thread starter Thread starter Graham
  • Start date Start date
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
 
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
 
Back
Top