I have a largely unmanaged C++ application that's broken up into several
static libraries. I have added a managed C++ class to one of these
libraries (let's say it's a.lib) and then referenced that managed class
from some other managed code in b.lib. The libraries all compile
successfully.

However, now when I try to build my application, I get unresolved token
link errors. All references to my managed class in a.lib are unresolved.
At first glance, I thought I needed to add #using a.lib, but it doesn't
appear that #using is supposed to be used with static libraries. Then I
tried #using MyManagedClass.obj, but that resulted in a bunch of errors
like 'operator`$ArrayType$0x7f4ea916'' already exists in the current
scope.

Should I put my managed classes into a separate managed C++ project (one
that compiles into a standalone assembly)? I don't know what else to
try.

Thanks,
John

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to