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++ / October 2005

Tip: Looking for answers? Try searching our database.

Beta 2005 linking with .NET 2003 libraries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Heloise - 12 Sep 2005 20:46 GMT
Hi,

.NET version: Visual C++ 2005 Express Edition Beta
OS:           XP

I have a set of dlls built with .NET 2003. They are unmanaged C++ and C
code.

I am writing a managed C++ dll layer to call my unmanaged libraries
using IJW.

When I try to link my Beta 2005 Managed C++ library layer with my old
.NET 2003 libraries, I get the following error(s) for a number of my
files:

error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ)

I have tried compiling my old libraries in the new Beta 2005 but it
can't find Windows.h so it fails.

1) Should I be able to link my old libraries with my new managed code
layer?

2) If not, how can I get my unmanaged code libraries to compile in Beta
2005?

Thanks anyone who can help. I've gone through this whole group and most
of the mdsn Visual Studio 2005 C++ documentation and haven't found
anything yet.

- Heloise
Carl Daniel [VC++ MVP] - 12 Sep 2005 21:18 GMT
> Hi,
>
[quoted text clipped - 19 lines]
> 1) Should I be able to link my old libraries with my new managed code
> layer?

No.

> 2) If not, how can I get my unmanaged code libraries to compile in
> Beta 2005?

Install the Platform SDK.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro/sdkint
ro/devdoc_platform_software_development_kit_start_page.asp


-cd
Heloise - 12 Sep 2005 21:26 GMT
Thanks Carl,

I will try that and let you know how it works.

- H
Heloise - 15 Sep 2005 18:02 GMT
Hi Carl,

I installed the Platform SDK

I successfully rebuilt my native C++ libraries with the new Platform
SDK

I linked my managed layer with my new VC8 native C++ libraries.

I still get the same error.

Any other ideas?

Thanks, Heloise
Heloise - 15 Sep 2005 18:34 GMT
Hi,

I found the fix in:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=23846

It is to add:

mscoree.lib, msvcmrt.lib and msvcrt.lib to the linker options

for anyone who encounters the same problem!

- Heloise
Heloise - 06 Oct 2005 20:18 GMT
Hi again Carl,

Can you tell me why my native DLLs from VS7.1 won't link with my
managed C++ VS8 layer?

Does it have to do with stl differences? name mangling? something else?

Thanks,

- Heloise
brckcc - 31 Oct 2005 20:50 GMT
Thanks.  This seemed to do the job, adding msvcmrt.lib to my project as well.
Signature

Bruce R.

> Hi,
>
[quoted text clipped - 8 lines]
>
> - Heloise

Rate this thread:







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.