Portable design of C ++ components

I have used COM and .NET assemblies in the past to develop component based systems. Now I'm going to work on a cross-plattform-C ++ project and want to also structure the code in the components ...

Obviously, COM and .NET are not an option because COM is not available anywhere, but Windows and assemblies will add dependencies to the .NET framework, which may not be available on the target system.

I know that due to differences in ABI, I will not be able to move components between different operating systems without recompiling, but I would like to write the code in such a way that it is compatible at the source code level.

Is there any system / framework that allows such an architecture in C ++?

+4
source share
4 answers

I have worked with such a system in the past - we basically reinvented COM. If you are interested in this approach, check out this great article: http://msdn.microsoft.com/en-us/library/ms809983.aspx

+1
source

Mozilla uses the XPCOM framework. I never used it myself, but I meant that it should look like Microsoft COM, but portable. This is the only component system built into the system that I know of, based on native code; if you work on Java, OSGi .

Today, most Unix programs use distributed component models in which components live in different processes. The current fashion system looks like DBus ; KDE3 used an alternative called DCOP ; and of course if you want to go this route there is a good old CORBA.

+1
source

If you can live with a Qt dependency (only core libraries, no GUI libraries), you can take a look at the CTK Plugin Framework

It is licensed under Apache 2.0 and is a dynamic C ++ component with an API that is almost identical to OSGi.

+1
source
0
source

All Articles