472,372 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 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 2823
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: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.