470,833 Members | 1,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Linking Mixed Mode and Managed Assemblies

I have a managed C++ project and two C# projects. All are class library
projects. The C++ project links with native C++ static libraries and
references to one C# project. The projects structure goes something like this.

Proj2_MCPP --(references)--Proj1_CSharp
Proj3_CSharp --(references)--Proj2_MCPP and Proj1_CSharp

My objective is to link the DLLs produced by the 3 projects into a single DLL.

I tried the following scenario.
1. csc Proj1_CSharp into a netmodule
2. cl Proj2_MCPP with /LN and /clr:oldSyntax switch to produce .obj files
3. csc Proj3_CSharp with /AddModule option and use .netmodule and .obj files
as input
4. Link 1, 2 and 3 into a dll.

and I also tried this.
1. csc Proj1_CSharp into a netmodule
2. Build Proj2_MCPP from VS.NET 2005 (based on
http://support.microsoft.com/kb/309805) to produce .netmodule and obj .files.
3. csc Proj3_CSharp with /AddModule option and use .netmodule and .obj files
as input
4. Link 1, 2 and 3 into a dll.

I never managed to reach step 4. I just stuck with error messages resulted
from step 3.

Am I doing the right thing? Or it is just not possible?

Thanks - Henry
Jun 27 '08 #1
0 698

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Bern McCarty | last post: by
8 posts views Thread by Nadav | last post: by
7 posts views Thread by Lee Crabtree | last post: by
7 posts views Thread by Boni | last post: by
2 posts views Thread by Ubergeek | last post: by
8 posts views Thread by Edward Diener | last post: by
5 posts views Thread by =?Utf-8?B?aWduaGVucnk=?= | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.