469,599 Members | 2,616 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,599 developers. It's quick & easy.

LNK2020 error

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:si****@headfirst.co.uk
www.callofcthulhu.com www.deadlandsgame.com
-
Nov 17 '05 #1
3 2744
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=e...TF-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.
--------------------

Nov 17 '05 #2
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:si****@headfirst.co.uk
www.callofcthulhu.com www.deadlandsgame.com
-
"Gary Chang" <v-******@online.microsoft.com> wrote in message
news:Ee**************@cpmsftngxa10.phx.gbl... 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=e...TF-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.
--------------------

Nov 17 '05 #3
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.
--------------------

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tony Baker | last post: by
2 posts views Thread by Vickie | last post: by
2 posts views Thread by tllee | last post: by
3 posts views Thread by S Wheeler | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.