> I would like to create a managed dll-project consisting of sources in
multiple languages: 1 cpp file and a few
> C# sources.  The cpp file contains some unmanaged code too.

You can't do it directly from VS.NET 2005, but there are several ways to do
what you want.  First, you can manage it from the command line using the
assembly linker (AL.EXE) or, when using C++, LINK.EXE.  For example:

Module1.cpp --> module1.netmodule
        C:>CL /LN /clr:safe module1.cpp

Module2.cs --> module2.netmodule
        C:>CSC /t:module module2.cs

C:>LINK /DLL /OUT:MixedLanguage.dll /LTCG module1.netmodule
module2.netmodule

Another option might be to use ILMerge
(http://research.microsoft.com/~mbarnett/ILMerge.aspx) which will merge
multiple assemblies together into a single output assembly.  Haven't tried
it with C++/CLI -- especially with unmanaged code in the assembly, but you
can give it a shot.  If you are willing to add a new target type into
MSBuild, Jomo Fisher had a process for using ILMerge from within VS.NET --
http://blogs.msdn.com/jomo_fisher/default.aspx

Best Regards,
Mark Smith

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to