便携式C ++组件设计 [英] Portable C++ Component Design

查看:155
本文介绍了便携式C ++组件设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去,我一直在使用COM和.NET程序集来开发基于组件的系统。现在我要开发一个跨平台C ++项目,并希望在组件中构建代码aswell ...

I've been using 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 structure the code in components aswell…

显然COM和.NET不是一个选项,因为COM在任何地方都不可用,但Windows和程序集将添加依赖项到.NET框架,这可能在目标系统不可用。

Obviously COM and .NET are not an option, as COM is not available anywhere but Windows and Assemblies would add dependencies to the .NET framwork which may be not available at the target system.

到ABI差异我不能在不重新编译的情况下在不同的操作系统之间移动组件,但是我想以一种方式编写代码,它在源代码级别是兼容的。

I'm aware that due to ABI-differences I won't be able to move components between different operating systems without recompilation, but I would like to write the code in a manner, that it's compatible at source-code-level.

有没有任何系统/框架在C ++中启用这样的架构?

Is there any system/framework that enables such a architecture in C++?

推荐答案

这样的系统在过去 - 我们基本上重新发明了COM。如果您对这种方法感兴趣,请查看这篇精彩文章: http:// msdn .microsoft.com / en-us / library / ms809983.aspx

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

这篇关于便携式C ++组件设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆