473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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 749

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
8
by: Nadav | last post by:
Hi, I am writing a performence critical application, this require me to stick to unmanaged C++ as performance is much better using unmanaged C++ ( about 33% better ), Still, I am trying to avoid...
0
by: Drew | last post by:
I am attempting to clean up some code by breaking a large mixed-mode Managed C++ library into two. I cannot get the darn thing to compile or link (depending on what I do). I have two...
7
by: Lee Crabtree | last post by:
I'm starting work on what will eventually be a very, very LARGE project. A lot of the project involves taking C/C++ class libraries and wrapping them with managed C++. I'd like to minimize the...
7
by: Boni | last post by:
Dear all, I have a global variable in the native code. I was assuming that I create a IJW CLI wrapper class and create an instance of this class in other appdomain, then the global variables will...
2
by: Ubergeek | last post by:
I recently came accross an article that stated that there were unresolved issued with calling native (i.e. "unmanaged" C++) from managed C++. Does anyone know what the precise details of this...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
0
by: emu | last post by:
Hi All, I have an unmanaged C++ application that references a mixed mode image DLL (mixed managed and unmanaged). Under .NET 1.1 we could trust the dll (the mixed mode dll) by running the...
5
by: =?Utf-8?B?aWduaGVucnk=?= | last post by:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.