STL对象和二进制兼容性 [英] STL objects and binary compatibility

查看:140
本文介绍了STL对象和二进制兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




对象与二进制兼容是什么意思?为什么

不是STL对象二进制兼容?任何见解,链接,资源

非常感谢。


谢谢。

Hi,

What does it mean for an object to be binary compatible? And why
aren''t STL objects binary compatible? Any insights, links, resources
for further reading are greatly appreciated.

Thanks.

推荐答案

os******@gmail.com 写道:




对象与二进制兼容是什么意思?为什么

不是STL对象二进制兼容?任何见解,链接,资源

进一步阅读非常感谢。
Hi,

What does it mean for an object to be binary compatible? And why
aren''t STL objects binary compatible? Any insights, links, resources
for further reading are greatly appreciated.



听起来你有点困惑。


二进制兼容性通常与上下文有关。 />

如果您使用不同版本的STL或使用各种选项构建

,这会导致二进制不兼容,那么这是您的选择。


请详细说明你真正关心的事情。

It sounds like you''re a little confused.

Binary compatablity usually is associated with a context.

If you build with different versions of the STL or with various options
that render binary incompatibility, then this is your choice.

Please elaborate what you''re really concerned about.


5月6日上午7:56,Gianni Mariani< gi4nos ... @ mariani。 wswrote:
On May 6, 7:56 am, Gianni Mariani <gi4nos...@mariani.wswrote:

osama ... @ gmail.com写道:
osama...@gmail.com wrote:


对象与二进制兼容是什么意思?为什么

不是STL对象二进制兼容?任何见解,链接,资源

进一步阅读非常感谢。
What does it mean for an object to be binary compatible? And why
aren''t STL objects binary compatible? Any insights, links, resources
for further reading are greatly appreciated.


听起来你有点困惑。
It sounds like you''re a little confused.



C ++对象和目标文件之间?两个目标文件

是否是二进制兼容的问题是有道理的。

Between C++ objects and object files? Whether two object files
are binary compatible makes sense as a question.


二进制兼容性通常与上下文相关联。
Binary compatablity usually is associated with a context.



它通常与编译器输出相关联:目标文件和

库。如果两个文件是对象兼容的,它们可以链接在一起并按预期工作。 (我知道你知道

那个,但我认为这是原来

海报试图问的问题的答案。)

It is usually associated with compiler output: object files and
libraries. If two files are object compatible, they can be
linked together and will work as expected. (I know you know
that, but I think it''s the answer to the question the original
poster tried to ask.)


如果您使用不同版本的STL或

构建各种使二进制不兼容的选项,那么这个

是您的选择。
If you build with different versions of the STL or with
various options that render binary incompatibility, then this
is your choice.



如果你使用的是第三方图书馆,你并不总是有一个

的选择。你必须编译所需的任何选项

以确保二进制兼容他们提供的东西。 (对于

初学者,这通常意味着用CC编译,而不是g ++。)


-

James Kanze(GABI软件)电子邮件:ja ********* @ gmail.com

Conseils eninformatiqueorientéeobjet/

Beratung in objektorientierter Datenverarbeitung

9placeSémard,78210 St.-Cyr-l''coco,法国,+ 33(0)1 30 23 00 34

If you''re using third party libraries, you don''t always have a
choice. You have to compile with whatever options are necessary
to ensure binary compatibility with what they furnish. (For
starters, this usually means compiling with CC, and not g++.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l''école, France, +33 (0)1 30 23 00 34


非常感谢。
further reading are greatly appreciated.

>

听起来你有点困惑。


二进制兼容性通常与上下文相关联。


如果您使用不同版本的STL或使用各种选项构建

,这会导致二进制不兼容,那么这就是您的选择。


请详细说明你真正关心的事情。
>
It sounds like you''re a little confused.

Binary compatablity usually is associated with a context.

If you build with different versions of the STL or with various options
that render binary incompatibility, then this is your choice.

Please elaborate what you''re really concerned about.



对不起我的问题不是很清楚。换句话说,STL对象可以跨越DLL边界。例如。我们可以安全地通过引用在

不同的二进制文件之间传递STL对象吗?

Sorry my question was not very clear. In other words, can STL Objects
cross DLL boundaries. For example. Can we pass STL objects between
different binaries by reference safely?


这篇关于STL对象和二进制兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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