LNK2020 error

S

Simon Jefferies

Hello,

I am trying to use a Managed C++ .NET (DLL) Class library within my Managed
C++ .NET forms application.

I have both projects in the same solution and have the class library under
my references branch in the forms application.

When I build i get the following linker error:-

LINK : error LNK2020: unresolved token (06000076)
MenuItems.MenuSystemPage::.ctor
LINK : error LNK2020: unresolved token (06000077)
MenuItems.MenuSystemPage::Finalize

Any ideas why this is happening?

Regards
Simon Jefferies
Tools Programmer, Headfirst Productions
mailto:[email protected]
www.callofcthulhu.com www.deadlandsgame.com
-
 
G

Gary Chang

Hi Simon,

Is it well when building your Managed C++ .NET (DLL) Class library project
alone?

If so how about using this Managed C++ .NET DLL in a .NET C#/VB.NET
project, is there any problem again?

And if that Managed C++ .NET DLL can be built OK with a non-Managed C++
project, I suggest you can take a look at the following threads:
http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&th=b4f20a
2ef0e65e8b&rnum=10


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
S

Simon Jefferies

Hello,
Is it well when building your Managed C++ .NET (DLL) Class library project
alone?


Yes it is.
If so how about using this Managed C++ .NET DLL in a .NET C#/VB.NET
project, is there any problem again?

Its fine.

To explain the problem further, if I create a managed C++ .NET DLL and
reference it in my project, I get class redefinitions and if I dont I get
the Linker error 2020 (presumbly because the library functions aren't
loaded - although it only complains about the constructor/destructors).

If I create a VB .NET project it seems to handle it better and with a simple
reference it finds all the classes it requires and runs fine.

Regards
Simon Jefferies
Tools Programmer, Headfirst Productions
mailto:[email protected]
www.callofcthulhu.com www.deadlandsgame.com
-
 
G

Gary Chang

OK, Simon:

It looks similar to the problem which the google group threads(I mentioned
in my first message) discussed about, is that useful to your scenario?


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 

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