Re: Curiosity: C# and C++ in one assembly
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Fri, 21 Nov 2008 17:13:04 -0600
"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:#Gux$T$SJHA.1172@xxxxxxxxxxxxxxxxxxxxxxx
It should be noted that Jeremy's response is incorrect.
Assuming managed C++, you can compile one of your projects into a netmodule (let's assume the C++ one to start). When compiling the C# code, on the command line, you would use the /addmodule switch and reference the C++ module, and it will be included in the assembly and its manifest.
Also note that while they are then part of the same assembly for security purposes, I believe they are still separate files (multiple-file assembly).
There is an ILMerge utility around somewhere that would generate a single file, not sure if it is updated to support the latest .NET assembly format.
.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<Henri.Chinasque@xxxxxxxxxxxxxx> wrote in message news:b40be9ba-4995-42e0-aba1-7f79c192c43c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxHi all,
Just from a pure curiosity standpoint, would it be possible to have an
assembly with both c++ and c#? Google searches seem to hint at a "yes"
but I'm not so sure.
thanks,
HC
- Follow-Ups:
- Re: Curiosity: C# and C++ in one assembly
- From: Arne Vajhøj
- Re: Curiosity: C# and C++ in one assembly
- References:
- Curiosity: C# and C++ in one assembly
- From: Henri . Chinasque
- Re: Curiosity: C# and C++ in one assembly
- From: Nicholas Paldino [.NET/C# MVP]
- Curiosity: C# and C++ in one assembly
- Prev by Date: Re: pinvoke double[] to Intptr , passing double as IntPtr ??
- Next by Date: OrderBy not acting
- Previous by thread: Re: Curiosity: C# and C++ in one assembly
- Next by thread: Re: Curiosity: C# and C++ in one assembly
- Index(es):
Relevant Pages
|