473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2884
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mccoyn | last post by:
I'm porting an old project to use .NET. When I try to link in a static library (.lib) that has a single managed class in it. I get the following errors: LINK : error LNK2020: unresolved token...
2
by: Jacob Cohen | last post by:
Under VC7.1, I am trying to wrap a native-C++ DLL that contains C++ objects in a Managed-C++ class library for use in a C# project. I created and compiled the native DLL under VC7.1 as a Win32...
1
by: Tony Baker | last post by:
Hi, If I 1) create a brand new Visual C++ Project -> Class Library (.Net) 2) in the stdafx.h file add #include <atlbase.h> I get the following errors: ------ Build started: Project: testATL,...
2
by: Vickie | last post by:
I have a very simple program with some computations. After using NODEFAULTLIB to get rid of LNK2005 errors such as: LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in...
0
by: Stefan | last post by:
Hi, Could anyone share some light on this and how I can work around it. If I have 2 managed c++ dlls (A and B) and B tries to use a native class in A this fails to link. It is easily...
0
by: Gustavo L. Fabro | last post by:
Greetings! I found myself with a LNK2020 linking problem using VS.NET 2003 under a situation that I was able to replicate in a small project. I found one workaround for the problem too, but...
0
by: Roland | last post by:
Hi, ultimately I want to call some unmanaged C++ class that contains some DirectShow code of mine from my C# classes, but for the time being I'd be happy if I could get this to build! I have...
2
by: tllee | last post by:
I wrote a simple stack program using class template on VC++ 2003 but am unable to resolve the following link errors: LINK : error LNK2020: unresolved token (0A000046) Stack.__dtor LINK : error...
3
by: S Wheeler | last post by:
Hi - I have a vc++ WinForms app. Can I override the WndProc so I can send custom messages to my app. Is there any way to do this? I need to notify the main form of events from a library. How is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.