473,511 Members | 16,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compile C#-Code and C++-Code into one class library


Hello,

currently, I have one class-library which is generated from a c++.net
class library project.
Into this project, I cannot include C# files.
On the other hand I have some C#-Code which accesses this class
library.
What I want to do is provide this C#-Code AND the C++.net-class-
library together
in one new class library. How can this be realized from a technical
point of view?
I don't want to have two class libraries!

Thanks!
Dec 14 '07 #1
3 1457
Hello~

I think there is no way to do this. Different programming language have
different
compiler.You cannot compile a CSharp code use a C++ compiler.

"Ezmeralda" <ez*******@gmx.de????
news:3e**********************************@i29g2000 prf.googlegroups.com...
>
Hello,

currently, I have one class-library which is generated from a c++.net
class library project.
Into this project, I cannot include C# files.
On the other hand I have some C#-Code which accesses this class
library.
What I want to do is provide this C#-Code AND the C++.net-class-
library together
in one new class library. How can this be realized from a technical
point of view?
I don't want to have two class libraries!

Thanks!
Dec 14 '07 #2
On Dec 14, 7:44 am, Ezmeralda <ezmera...@gmx.dewrote:
currently, I have one class-library which is generated from a c++.net
class library project.
Into this project, I cannot include C# files.
On the other hand I have some C#-Code which accesses this class
library. What I want to do is provide this C#-Code AND the C++.net-class-
library together in one new class library. How can this be realized from a technical
point of view? I don't want to have two class libraries!
Have a look at http://research.microsoft.com/~mbarnett/ILMerge.aspx

Jon
Dec 14 '07 #3
While Jon and Delicioustian have good ideas, there really is a simpler
way.

You can use the command line compilers to compile each project into a
netmodule (look at the command line compiler information for each respective
language for more info). Once you have those netmodules, you can use the
assembly linker (al.exe) to link the modules into an assembly.

You might even be able to modify the MSBUILD scripts to do this for you
at build time, but I haven't looked into that. It's feasible though.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ezmeralda" <ez*******@gmx.dewrote in message
news:3e**********************************@i29g2000 prf.googlegroups.com...
>
Hello,

currently, I have one class-library which is generated from a c++.net
class library project.
Into this project, I cannot include C# files.
On the other hand I have some C#-Code which accesses this class
library.
What I want to do is provide this C#-Code AND the C++.net-class-
library together
in one new class library. How can this be realized from a technical
point of view?
I don't want to have two class libraries!

Thanks!

Dec 14 '07 #4

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

Similar topics

0
1262
by: Metal2You | last post by:
I have several modules that each have several of their own Crystal reports. When I compile these modules as Windows Applications the reports work fine. When I compile the modules as Class...
2
2768
by: Chua Wen Ching | last post by:
Hi there, I had some doubts on creatings plugins. As most example on the internet shows how to write plugins onto a plugin host which is normally a windows form program. 1) Can i replace...
7
1218
by: juli jul | last post by:
Hello, I am trying to compile a project and get the following error: A project with an Output Type of Class Library cannot be started directly Can somebody explain me why? Thank you very much!
4
1750
by: Brian Shannon | last post by:
I am playing around with class libraries trying to understand how they work. I created a class library, library.vb. I placed the library.dll into the bin directory and set my reference. If I...
0
942
by: BruinBySea | last post by:
Here is the problem. I built LibA and LibB as class library projects in the same solution as my web application HelloWorldWebApp. Wherever necessary I added project references. Everything...
1
2433
by: Tony Johansson | last post by:
Hello!! I use VS 2003 and C#. I have sent several mail even tried with crossgroup because I want to find out if my problem is a bug in .NET or if .NET doesn't support what I do. It's only one...
4
1711
by: Peter | last post by:
Are there any restrictions in using MarshalAs when p/invoke-ing from a class library as opposed to a windows application in .NET CF 2.0? The following code will not compile in a CF class library...
1
5345
by: Zoe Hart | last post by:
Prior to VS2005 I configured my applications via the appSettings section of the app.config file. When I developed a class library, I used ConfigurationManager.AppSettings(settingName) syntax and...
1
1629
by: Dale | last post by:
I have a user control on a Windows Form that, in its Load event handler, calls a method from a class library to initialize an array of objects that are then used to populate a ComboBox. When I...
0
7242
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
7138
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
7510
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
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5066
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...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.