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