Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

LNK2020 error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon Jefferies - 20 May 2004 10:36 GMT
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:simonj@headfirst.co.uk
www.callofcthulhu.com www.deadlandsgame.com
-
Gary Chang - 21 May 2004 06:03 GMT
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

Signature

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

--------------------
Simon Jefferies - 21 May 2004 09:34 GMT
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:simonj@headfirst.co.uk
www.callofcthulhu.com www.deadlandsgame.com
-
> Hi Simon,
>
[quoted text clipped - 20 lines]
> rights.
> --------------------
Gary Chang - 22 May 2004 04:54 GMT
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

Signature

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

--------------------

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.